Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
communication.h
00001 #ifndef COMMUNICATION 00002 #define COMMUNICATION 00003 00004 #include "stm32h7xx_hal.h" 00005 00006 #define COMMUNICATION_DELAY 1 00007 #define COMMUNICATION_WAITTING COMMUNICATION_DELAY * 5 00008 00009 #define ALIGN32_SIZE(SIZE_ALIGN) (((SIZE_ALIGN + 31)/32)*32) 00010 00011 enum _BOOL_ 00012 { 00013 _TRUE_ = 1, 00014 _FALSE_ = 0 00015 }; 00016 00017 enum OP_TYPE 00018 { 00019 READ, 00020 WRITE, 00021 CPLT, 00022 NONE 00023 }; 00024 00025 //void ReceiveUARTPackage(UART_HandleTypeDef *huart, uint8_t *buf, uint8_t len); 00026 //void TransmitUARTPackage(UART_HandleTypeDef *huart, uint8_t *buf, uint8_t len); 00027 00028 void WriteToRegisterBySPI(SPI_HandleTypeDef *hspi, uint8_t addr, uint8_t *buf, uint8_t len); 00029 void ReadFromRegisterBySPI(SPI_HandleTypeDef *hspi, uint8_t addr, uint8_t *buf, uint8_t len); 00030 00031 #endif
Generated on Thu Jul 14 2022 00:56:52 by
1.7.2