commprt.h 503 B

1234567891011121314151617181920
  1. /*
  2. * commprt.h
  3. *
  4. * Created on: Jan 25, 2022
  5. * Author: radioman
  6. */
  7. #ifndef INC_COMMPRT_H_
  8. #define INC_COMMPRT_H_
  9. #include <stdint.h>
  10. typedef enum { COMM_BT, COMM_USB } COMM_IfaceTypeDef;
  11. typedef enum { COMM_OK, COMM_FAIL, COMM_TIMEOUT, COMM_CHECKSUM_MISTMATCH } COMM_StatusTypeDef;
  12. COMM_StatusTypeDef COMM_Receive(uint8_t *buf, COMM_IfaceTypeDef iface, uint32_t timeout);
  13. COMM_StatusTypeDef COMM_Transmit(uint8_t *data, uint8_t len, COMM_IfaceTypeDef iface);
  14. #endif /* INC_COMMPRT_H_ */