/* Check whether this value represents an NEC data bit 0.  */
static bool bit_zero_if(rmt_item32_t *item)
/* Check whether this value represents an NEC data bit 0.  */
static bool bit_zero_if(rmt_item32_t *item)
{
    if((item->level0 == RMT_RX_ACTIVE_LEVEL && item->level1 != RMT_RX_ACTIVE_LEVEL)
        && check_in_range(item->duration0, BIT_ZERO_HIGH_US, BIT_MARGIN)
        && check_in_range(item->duration1, BIT_ZERO_LOW_US, BIT_MARGIN)) {
        return true;
    }
    return false;
}