/* Check whether this value represents an NEC header.  */
static bool nec_header_if(rmt_item32_t *item)
/* Check whether this value represents an NEC header.  */
static bool nec_header_if(rmt_item32_t *item)
{
    if((item->level0 == RMT_RX_ACTIVE_LEVEL && item->level1 != RMT_RX_ACTIVE_LEVEL)
        && nec_check_in_range(item->duration0, NEC_HEADER_HIGH_US, NEC_BIT_MARGIN)
        && nec_check_in_range(item->duration1, NEC_HEADER_LOW_US, NEC_BIT_MARGIN)) {
        return true;
    }
    return false;
}