|PDF Title :||Beginning STM32: developing with FreeRTOS|
|Total Page :||418 Pages|
|PDF Size :||4.0 MB|
|PDF Link :||Available|
Here on this page, we have provided the latest download link for Beginning STM32: developing with FreeRTOS PDF. Please feel free to download it on your computer/mobile. For further reference, you can go to apress.com
Beginning STM32: developing with FreeRTOS – Book
The message is passed into can_recv() with a pointer to the s_canmsg structure, which is populated with the received data. Because the data member msg->data is interpreted based upon its message ID, the union u_msg is declared in lines 121 to 123. This permits the programmer to access the msg->data array as a struct s_lamp_en when it is needed.
To show sign of life, line 126 toggles the onboard LED (PC13). Normal messages will not have the msg->rtrf flag set (line 128). In this case, we expect the usual lamp commands (lines 130 to 137).
Otherwise, when msg->rtrf is true, this represents a request for the rear module to read the temperature and respond with it (lines 143 to 150). The function degrees_ C100() returns the temperature in degrees Celsius times one hundred. This is simply transmitted by line 146. Note that the third argument of the call is the RTR flag, which is sent as false (this is the response). The function can_xmit() is declared in canmsgs.c, not to be confused with the libopencm3 routine can_transmit().
Be mindful that can_recv() is called as part of another task. This requires safe intertask communication.
Beginning STM32: developing with FreeRTOS PDF
Know more about our initiative