Lines Matching refs:p_rmt

755         rmt_obj_t *p_rmt = p_rmt_obj[channel];  in rmt_driver_isr_default()  local
756 if (p_rmt) { in rmt_driver_isr_default()
757 xSemaphoreGiveFromISR(p_rmt->tx_sem, &HPTaskAwoken); in rmt_driver_isr_default()
759 p_rmt->tx_data = NULL; in rmt_driver_isr_default()
760 p_rmt->tx_len_rem = 0; in rmt_driver_isr_default()
761 p_rmt->tx_offset = 0; in rmt_driver_isr_default()
762 p_rmt->tx_sub_len = 0; in rmt_driver_isr_default()
763 p_rmt->sample_cur = NULL; in rmt_driver_isr_default()
764 p_rmt->translator = false; in rmt_driver_isr_default()
777 rmt_obj_t *p_rmt = p_rmt_obj[channel]; in rmt_driver_isr_default() local
778 if (p_rmt) { in rmt_driver_isr_default()
779 if (p_rmt->translator) { in rmt_driver_isr_default()
780 if (p_rmt->sample_size_remain > 0) { in rmt_driver_isr_default()
782 p_rmt->sample_to_rmt((void *)p_rmt->sample_cur, in rmt_driver_isr_default()
783 p_rmt->tx_buf, in rmt_driver_isr_default()
784 p_rmt->sample_size_remain, in rmt_driver_isr_default()
785 p_rmt->tx_sub_len, in rmt_driver_isr_default()
787 &p_rmt->tx_len_rem); in rmt_driver_isr_default()
788 p_rmt->sample_size_remain -= translated_size; in rmt_driver_isr_default()
789 p_rmt->sample_cur += translated_size; in rmt_driver_isr_default()
790 p_rmt->tx_data = p_rmt->tx_buf; in rmt_driver_isr_default()
792 p_rmt->sample_cur = NULL; in rmt_driver_isr_default()
793 p_rmt->translator = false; in rmt_driver_isr_default()
796 const rmt_item32_t *pdata = p_rmt->tx_data; in rmt_driver_isr_default()
797 size_t len_rem = p_rmt->tx_len_rem; in rmt_driver_isr_default()
798 if (len_rem >= p_rmt->tx_sub_len) { in rmt_driver_isr_default()
799 rmt_fill_memory(channel, pdata, p_rmt->tx_sub_len, p_rmt->tx_offset); in rmt_driver_isr_default()
800 p_rmt->tx_data += p_rmt->tx_sub_len; in rmt_driver_isr_default()
801 p_rmt->tx_len_rem -= p_rmt->tx_sub_len; in rmt_driver_isr_default()
804 rmt_ll_write_memory(rmt_contex.hal.mem, channel, &stop_data, 1, p_rmt->tx_offset); in rmt_driver_isr_default()
806 rmt_fill_memory(channel, pdata, len_rem, p_rmt->tx_offset); in rmt_driver_isr_default()
808 … rmt_ll_write_memory(rmt_contex.hal.mem, channel, &stop_data, 1, p_rmt->tx_offset + len_rem); in rmt_driver_isr_default()
809 p_rmt->tx_data += len_rem; in rmt_driver_isr_default()
810 p_rmt->tx_len_rem -= len_rem; in rmt_driver_isr_default()
812 if (p_rmt->tx_offset == 0) { in rmt_driver_isr_default()
813 p_rmt->tx_offset = p_rmt->tx_sub_len; in rmt_driver_isr_default()
815 p_rmt->tx_offset = 0; in rmt_driver_isr_default()
826 rmt_obj_t *p_rmt = p_rmt_obj[RMT_ENCODE_RX_CHANNEL(channel)]; in rmt_driver_isr_default() local
827 if (p_rmt) { in rmt_driver_isr_default()
831 if (p_rmt->rx_buf) { in rmt_driver_isr_default()
834 if (item_len > p_rmt->rx_item_start_idx) { in rmt_driver_isr_default()
835 item_len = item_len - p_rmt->rx_item_start_idx; in rmt_driver_isr_default()
837 …memcpy((void *)(p_rmt->rx_item_buf + p_rmt->rx_item_len), (void *)(addr + p_rmt->rx_item_start_idx… in rmt_driver_isr_default()
838 p_rmt->rx_item_len += item_len; in rmt_driver_isr_default()
839 …BaseType_t res = xRingbufferSendFromISR(p_rmt->rx_buf, (void *)(p_rmt->rx_item_buf), p_rmt->rx_ite… in rmt_driver_isr_default()
841 … BaseType_t res = xRingbufferSendFromISR(p_rmt->rx_buf, (void *)addr, item_len * 4, &HPTaskAwoken); in rmt_driver_isr_default()
851 p_rmt->rx_item_start_idx = 0; in rmt_driver_isr_default()
852 p_rmt->rx_item_len = 0; in rmt_driver_isr_default()
853 memset((void *)p_rmt->rx_item_buf, 0, p_rmt->rx_item_buf_size); in rmt_driver_isr_default()
868 rmt_obj_t *p_rmt = p_rmt_obj[RMT_ENCODE_RX_CHANNEL(channel)]; in rmt_driver_isr_default() local
871 … int item_len = (p_rmt->rx_item_start_idx == 0) ? rx_thres_lim : (mem_item_size - rx_thres_lim); in rmt_driver_isr_default()
872 if ((p_rmt->rx_item_len + item_len) < (p_rmt->rx_item_buf_size / 4)) { in rmt_driver_isr_default()
874 …memcpy((void *)(p_rmt->rx_item_buf + p_rmt->rx_item_len), (void *)(RMTMEM.chan[RMT_ENCODE_RX_CHANN… in rmt_driver_isr_default()
876 p_rmt->rx_item_len += item_len; in rmt_driver_isr_default()
877 p_rmt->rx_item_start_idx += item_len; in rmt_driver_isr_default()
878 if (p_rmt->rx_item_start_idx >= mem_item_size) { in rmt_driver_isr_default()
879 p_rmt->rx_item_start_idx = 0; in rmt_driver_isr_default()
882 ESP_EARLY_LOGE(TAG, "---RX buffer too small: %d", sizeof(p_rmt->rx_item_buf)); in rmt_driver_isr_default()
894 rmt_obj_t *p_rmt = p_rmt_obj[channel]; in rmt_driver_isr_default() local
895 if (p_rmt) { in rmt_driver_isr_default()
896 if (p_rmt->loop_autostop) { in rmt_driver_isr_default()
903 xSemaphoreGiveFromISR(p_rmt->tx_sem, &HPTaskAwoken); in rmt_driver_isr_default()
917 rmt_obj_t *p_rmt = p_rmt_obj[RMT_ENCODE_RX_CHANNEL(channel)]; in rmt_driver_isr_default() local
918 if (p_rmt) { in rmt_driver_isr_default()
932 rmt_obj_t *p_rmt = p_rmt_obj[channel]; in rmt_driver_isr_default() local
933 if (p_rmt) { in rmt_driver_isr_default()
1125 rmt_obj_t *p_rmt = p_rmt_obj[channel]; in rmt_write_items() local
1130 xSemaphoreTake(p_rmt->tx_sem, portMAX_DELAY); in rmt_write_items()
1137 p_rmt->tx_data = rmt_item + item_block_len; in rmt_write_items()
1138 p_rmt->tx_len_rem = len_rem; in rmt_write_items()
1139 p_rmt->tx_offset = 0; in rmt_write_items()
1140 p_rmt->tx_sub_len = item_sub_len; in rmt_write_items()
1145 p_rmt->tx_len_rem = 0; in rmt_write_items()
1148 p_rmt->wait_done = wait_tx_done; in rmt_write_items()
1153 xSemaphoreTake(p_rmt->tx_sem, portMAX_DELAY); in rmt_write_items()
1154 xSemaphoreGive(p_rmt->tx_sem); in rmt_write_items()
1158 xSemaphoreTake(p_rmt->tx_sem, portMAX_DELAY); in rmt_write_items()
1159 xSemaphoreGive(p_rmt->tx_sem); in rmt_write_items()
1264 rmt_obj_t *p_rmt = p_rmt_obj[channel]; in rmt_write_sample() local
1267 xSemaphoreTake(p_rmt->tx_sem, portMAX_DELAY); in rmt_write_sample()
1268p_rmt->sample_to_rmt((void *)src, p_rmt->tx_buf, src_size, item_block_len, &translated_size, &p_rm… in rmt_write_sample()
1269 p_rmt->sample_size_remain = src_size - translated_size; in rmt_write_sample()
1270 p_rmt->sample_cur = src + translated_size; in rmt_write_sample()
1271 rmt_fill_memory(channel, p_rmt->tx_buf, p_rmt->tx_len_rem, 0); in rmt_write_sample()
1272 if (p_rmt->tx_len_rem == item_block_len) { in rmt_write_sample()
1274 p_rmt->tx_data = p_rmt->tx_buf; in rmt_write_sample()
1275 p_rmt->tx_offset = 0; in rmt_write_sample()
1276 p_rmt->tx_sub_len = item_sub_len; in rmt_write_sample()
1277 p_rmt->translator = true; in rmt_write_sample()
1280 rmt_ll_write_memory(rmt_contex.hal.mem, channel, &stop_data, 1, p_rmt->tx_len_rem); in rmt_write_sample()
1281 p_rmt->tx_len_rem = 0; in rmt_write_sample()
1282 p_rmt->sample_cur = NULL; in rmt_write_sample()
1283 p_rmt->translator = false; in rmt_write_sample()
1286 p_rmt->wait_done = wait_tx_done; in rmt_write_sample()
1288 xSemaphoreTake(p_rmt->tx_sem, portMAX_DELAY); in rmt_write_sample()
1289 xSemaphoreGive(p_rmt->tx_sem); in rmt_write_sample()