Robot
The embedded systems for UTRA's autonomous humanoid soccer-playing robot
StartTxTask Helper Functions

Helper functions for StartTxTask() More...

Collaboration diagram for StartTxTask Helper Functions:

Functions

void shiftNotificationMask (void)
 Shifts bits of NOTIFICATION_MASK. More...
 
void copySensorDataToSend (void)
 Validates and copies sensor data to transmit. More...
 
void transmitStatusFromPC (void)
 Makes calls to the UART module responsible for PC communication atomic. More...
 
void waitForNotificationTX (void)
 Waits until notified from ISR. More...
 

Detailed Description

Helper functions for StartTxTask()

StartTxTask Helper Functions

Function Documentation

◆ copySensorDataToSend()

void copySensorDataToSend ( void  )

Validates and copies sensor data to transmit.

This function receives two types of sensor data(motor and IMU) and updates to the according section of robotState.msg.

Parameters
None
Returns
None

Definition at line 72 of file tx_helper.cpp.

Here is the caller graph for this function:

◆ shiftNotificationMask()

void shiftNotificationMask ( void  )

Shifts bits of NOTIFICATION_MASK.

Parameters
None
Returns
None

Definition at line 59 of file tx_helper.cpp.

Here is the caller graph for this function:

◆ transmitStatusFromPC()

void transmitStatusFromPC ( void  )

Makes calls to the UART module responsible for PC communication atomic.

This do-while loop with the mutex inside of it makes c This attempts to solve the following scenario: the TX thread is in the middle of executing the call to HAL_UART_Transmit when suddenly the RX thread is unblocked. The RX thread calls HAL_UART_Receive, and returns immediately when it detects that the uart module is already locked. Then the RX thread blocks itself and never wakes up since a RX transfer was never initialized.

Parameters
None
Returns
None

Definition at line 123 of file tx_helper.cpp.

Here is the caller graph for this function:

◆ waitForNotificationTX()

void waitForNotificationTX ( void  )

Waits until notified from ISR.

Clear no bits on entry in case the notification came while a higher priority task was executing.

Parameters
None
Returns
None

Definition at line 139 of file tx_helper.cpp.

Here is the caller graph for this function: