lhr-solar / Embedded-Sharepoint

This repository contains files that can be shared among us, the embedded design teams.
MIT License
3 stars 3 forks source link

BSP_CAN #9

Open IshDeshpa opened 1 year ago

IshDeshpa commented 1 year ago

Rewrite the BSP_CAN Driver to use the HAL. Make sure that functionality is accessible and generic to both Controls and BPS systems, and any future embedded systems.

Use STM32Cube to autogenerate code that may aid in writing this driver. Note that this driver must be configurable and will probably need to be more than just the autogenerated code.

BPS BSP_CAN Controls BSP_CAN

IshDeshpa commented 1 year ago

https://github.com/lhr-solar/Controls/issues/346

NathanielDelgado commented 1 year ago

Leave here for reference:

HAL_CAN_Init() is split into both HAL_CAN_Init() and HAL_CAN_Start() HAL_CAN_Transmit() is replaced by HAL_CAN_AddTxMessage() to place Tx request, then HAL_CAN_GetTxMailboxesFreeLevel() for polling until completion HAL_CAN_Transmit_IT() is replaced by HAL_CAN_ActivateNotification() to enable transmission with interrupt mode, then HAL_CAN_AddTxMessage() to place Tx request HAL_CAN_Receive() is replaced by HAL_CAN_GetRxFifoFillLevel() for polling until reception, then HAL_CAN_GetRxMessage() to get Rx message HAL_CAN_Receive_IT() is replaced by HAL_CAN_ActivateNotification() to enable reception with interrupt mode, then HAL_CAN_GetRxMessage() in the receive callback to get Rx message HAL_CAN_Sleep() is renamed to HAL_CAN_RequestSleep() HAL_CAN_TxCpltCallback() is split into HAL_CAN_TxMailbox0CompleteCallback(), HAL_CAN_TxMailbox1CompleteCallback() and HAL_CAN_TxMailbox2CompleteCallback() HAL_CAN_RxCpltCallback() is split into HAL_CAN_RxFifo0MsgPendingCallback() and HAL_CAN_RxFifo1MsgPendingCallback()