23 #ifndef FOXBMS__NXP_MC33775A_LL_H_
24 #define FOXBMS__NXP_MC33775A_LL_H_
37 #define N775_ALL_CHAINS (0x1C0u)
38 #define N775_ALL_DEVICES (0x03Fu)
41 #define N775_ERROR_REGISTER_ADDRESS 0x3FFF
66 uint16_t deviceAddress,
67 uint16_t registerAddress,
80 uint16_t deviceAddress,
81 uint16_t registerAddress,
96 uint16_t deviceAddress,
97 uint16_t numberOfItems,
98 uint16_t responseLength,
99 uint16_t registerAddress,
122 uint16_t masterAddress,
123 uint16_t deviceAddress,
124 uint16_t registerAddress,
143 uint16_t *pMasterAddress,
144 uint16_t *pDeviceAddress,
145 uint16_t *pRegisterAddress,
151 #ifdef UNITY_UNIT_TEST
N775_COMMUNICATION_STATUS_e N775_CommunicationReadMultiple(uint16_t deviceAddress, uint16_t numberOfItems, uint16_t responseLength, uint16_t registerAddress, uint16_t *pValues, N775_STATE_s *n775_state)
Read multiple values from specific registers in a specific device.
N775_COMMUNICATION_STATUS_e N775_CommunicationDecomposeMessage(uc_msg_t *pMessage, uint16_t *pCommand, uint16_t *pMasterAddress, uint16_t *pDeviceAddress, uint16_t *pRegisterAddress, uint16_t *pLength, uint16_t *pValue, uint8_t string)
Decomposes and analysis a message.
enum N775_COMMUNICATION_STATUS N775_COMMUNICATION_STATUS_e
void N775_ResetMessageCounter(uint16_t deviceAddress, uint8_t string)
Reset the message counter for one or all devices.
void N775_CommunicationWrite(uint16_t deviceAddress, uint16_t registerAddress, uint16_t value, SPI_INTERFACE_CONFIG_s *pSpiInterface)
Write a value into a specific register in a specific device.
N775_COMMUNICATION_STATUS_e N775_CommunicationRead(uint16_t deviceAddress, uint16_t registerAddress, uint16_t *pValue, N775_STATE_s *n775_state)
Read a value from a specific register in a specific device.
N775_COMMUNICATION_STATUS
@ N775_COMMUNICATION_ERROR_NOT_MATCHING_REGISTER_ADDRESS
@ N775_COMMUNICATION_ERROR_NO_ACCESS
@ N775_COMMUNICATION_ERROR_WRONG_MESSAGE_COUNT
@ N775_COMMUNICATION_ERROR_WRONG_CRC
@ N775_COMMUNICATION_ERROR_TIMEOUT
@ N775_COMMUNICATION_ERROR_SHORT_MESSAGE
@ N775_COMMUNICATION_ERROR_NO_RESPONSE
@ N775_COMMUNICATION_ERROR_NOT_MATCHING_DEVICE_ADDRESS
void N775_CommunicationComposeMessage(uint16_t cmd, uint16_t masterAddress, uint16_t deviceAddress, uint16_t registerAddress, uint16_t length, uint16_t *pValue, uc_msg_t *pMessage)
Composes a message.
Header for the configuration for the MC33775A analog front-end.
Headers for the driver for the SPI module.