Skip to content

Commit

Permalink
TDMA: doc, fix typos in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SaidAlvarado committed Oct 3, 2024
1 parent 5d13da0 commit 0caa595
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bsp/ipc.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static inline void db_ipc_network_call(ipc_req_t req) {
}
while (!ipc_shared_data.net_ack) {
if (ipc_shared_data.req == DB_IPC_REQ_NONE) {
// Something went wrong and, the net-core deleted the request without fullfilling it.
// Something went wrong and, the net-core deleted the request without fulfilling it.
// Re-send it
ipc_shared_data.req = req;
NRF_IPC_S->TASKS_SEND[DB_IPC_CHAN_REQ] = 1;
Expand Down
2 changes: 1 addition & 1 deletion drv/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ typedef enum {
DB_PROTOCOL_CMD_XGO_ACTION = 11, ///< XGO action command
DB_PROTOCOL_LH2_PROCESSED_DATA = 12, ///< Lighthouse 2 data processed at the DotBot
DB_PROTOCOL_TDMA_UPDATE_TABLE = 13, ///< Receive new timings for the TDMA table
DB_PROTOCOL_TDMA_SYNC_FRAME = 14, ///< Sent by the gateway at the begining of a TDMA frame, if there is nothing else to send.
DB_PROTOCOL_TDMA_SYNC_FRAME = 14, ///< Sent by the gateway at the beginning of a TDMA frame, if there is nothing else to send.
} command_type_t;

/// Application type
Expand Down
2 changes: 1 addition & 1 deletion drv/tdma_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void db_tdma_client_get_table(tdma_client_table_t *table);
void db_tdma_client_tx(const uint8_t *packet, uint8_t length);

/**
* @brief Ignore TDMA table and send all pending packets inmediatly
* @brief Ignore TDMA table and send all pending packets immediately
*
*/
void db_tdma_client_flush(void);
Expand Down
10 changes: 5 additions & 5 deletions drv/tdma_client/tdma_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ void db_tdma_client_init(tdma_client_cb_t callback, db_radio_ble_mode_t radio_mo

// Initialize Radio
db_radio_init(&tdma_client_callback, radio_mode); // set the radio callback to our tdma catch function
db_radio_set_frequency(radio_freq); // Pass through the rest of the arguments
db_radio_rx(); // start receving packets
db_radio_set_frequency(radio_freq); // pass through the rest of the arguments
db_radio_rx(); // start receiving packets

// Start the random number generator
db_rng_init();
Expand Down Expand Up @@ -348,7 +348,7 @@ static uint32_t _get_random_delay_us(void) {
*
* This function will be called each time a radio packet is received.
* it will catch any TDMA related packet and update the timing table.
* All other types of packets are passed directly into the user-defined call-back
* All other types of packets are passed directly into the user-defined callback
*
* @param[in] packet pointer to the data array with the data packet
* @param[in] length length of the packet received trough the radio
Expand All @@ -373,7 +373,7 @@ static void tdma_client_callback(uint8_t *packet, uint8_t length) {
return;
}

// THe application type needs to be checked inside the application itself.
// The application type needs to be checked inside the application itself.
// We don't know it a priori

// check and process the TDMA packets
Expand Down Expand Up @@ -425,7 +425,7 @@ static void tdma_client_callback(uint8_t *packet, uint8_t length) {
// Protect against receiving garbage
if (frame_period > 0 && frame_period < 500000) {
_tdma_client_vars.tdma_client_table.frame_duration = frame_period;
// Also update the RX_duration, becaus ewe are working on ALWAYS_ON mode
// Also update the RX_duration, because we are working on ALWAYS_ON mode
_tdma_client_vars.tdma_client_table.rx_duration = frame_period;
}

Expand Down
2 changes: 1 addition & 1 deletion projects/01drv_tdma_client/01drv_tdma_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

//=========================== defines ==========================================

#define DELAY_MS (500) // Wait 100ms between each send
#define DELAY_MS (500) // Wait 500ms between each send
#define RADIO_FREQ (28) // Set the frequency to 2412 MHz
#define RADIO_MODE (DB_RADIO_BLE_1MBit) // Use BLE 1Mbit/s
#define RADIO_APP (DotBot) // DotBot Radio App
Expand Down
2 changes: 1 addition & 1 deletion projects/03app_nrf5340_net/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int main(void) {
}
ipc_shared_data.net_ack = true;
_nrf53_net_vars._req_received = DB_IPC_REQ_NONE;
ipc_shared_data.req = DB_IPC_REQ_NONE; // used in the app-core ipc.h to check that the request was properly fullfilled.
ipc_shared_data.req = DB_IPC_REQ_NONE; // used in the app-core ipc.h to check that the request was properly fulfilled.
__NOP();
}
};
Expand Down

0 comments on commit 0caa595

Please sign in to comment.