adc
communication.h
- Committer:
- yuliyasm
- Date:
- 2020-10-27
- Revision:
- 1:5796bdddf29c
- Child:
- 3:1d62b3be52e8
File content as of revision 1:5796bdddf29c:
#ifndef COMMUNICATION #define COMMUNICATION #include "stm32h7xx_hal.h" #define COMMUNICATION_DELAY 1 #define COMMUNICATION_WAITTING COMMUNICATION_DELAY * 5 enum _BOOL_ { _TRUE_ = 1, _FALSE_ = 0 }; enum OP_TYPE { READ, WRITE, CPLT, NONE }; //void ReceiveUARTPackage(UART_HandleTypeDef *huart, uint8_t *buf, uint8_t len); //void TransmitUARTPackage(UART_HandleTypeDef *huart, uint8_t *buf, uint8_t len); void WriteToRegisterBySPI(SPI_HandleTypeDef *hspi, uint8_t addr, uint8_t *buf, uint8_t len); void ReadFromRegisterBySPI(SPI_HandleTypeDef *hspi, uint8_t addr, uint8_t *buf, uint8_t len); #endif