Lines Matching refs:tx_pos
98 uint8_t tx_pos = 0; in clock_sync_package_callback() local
106 if (sizeof(tx_buf) - tx_pos < MAX_CLOCK_SYNC_ANS_LEN) { in clock_sync_package_callback()
113 tx_buf[tx_pos++] = CLOCK_SYNC_CMD_PKG_VERSION; in clock_sync_package_callback()
114 tx_buf[tx_pos++] = LORAWAN_PACKAGE_ID_CLOCK_SYNC; in clock_sync_package_callback()
115 tx_buf[tx_pos++] = CLOCK_SYNC_PACKAGE_VERSION; in clock_sync_package_callback()
148 tx_buf[tx_pos++] = CLOCK_SYNC_CMD_DEVICE_APP_TIME_PERIODICITY; in clock_sync_package_callback()
149 tx_buf[tx_pos++] = 0x00; /* Status: OK */ in clock_sync_package_callback()
151 tx_pos += clock_sync_serialize_device_time(tx_buf + tx_pos, in clock_sync_package_callback()
152 sizeof(tx_buf) - tx_pos); in clock_sync_package_callback()
176 if (tx_pos > 0) { in clock_sync_package_callback()
177 lorawan_services_schedule_uplink(LORAWAN_PORT_CLOCK_SYNC, tx_buf, tx_pos, 0); in clock_sync_package_callback()
183 uint8_t tx_pos = 0; in clock_sync_app_time_req() local
192 tx_buf[tx_pos++] = CLOCK_SYNC_CMD_APP_TIME; in clock_sync_app_time_req()
193 tx_pos += clock_sync_serialize_device_time(tx_buf + tx_pos, in clock_sync_app_time_req()
194 sizeof(tx_buf) - tx_pos); in clock_sync_app_time_req()
197 tx_buf[tx_pos++] = ctx.req_token; in clock_sync_app_time_req()
201 lorawan_services_schedule_uplink(LORAWAN_PORT_CLOCK_SYNC, tx_buf, tx_pos, 0); in clock_sync_app_time_req()