bf16-ctrldevice.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef BF16_CTRLDEVICE_H
  2. #define BF16_CTRLDEVICE_H
  3. #include "bf16-brd-control.h"
  4. #include "bf16-device.h"
  5. #define CTRL_BUFFER_SIZE 96
  6. /* CTRL functions */
  7. #define F_BUZZER 0
  8. #define F_LED1 1
  9. #define F_LED2 2
  10. #define F_BRST 3
  11. #define F_RST 4
  12. #define F_BDET 5
  13. #define F_STAT 6
  14. /* read in signals */
  15. #define HW_VER "HW_VER"
  16. #define BTN_FR "BTN_FR"
  17. #define BTN_DISCOVERY "BTN_DISCOVERY"
  18. #define CH1_DET "CH1_DET"
  19. #define CH2_DET "CH2_DET"
  20. /* write out signals */
  21. #define BUZZER "BUZZER"
  22. #define LED_GREEN "LED_GREEN"
  23. #define LED_RED "LED_RED"
  24. #define CH1_MSP_RST "CH1_MSP_RST"
  25. #define CH2_MSP_RST "CH2_MSP_RST"
  26. #define CH1_SPI_RES "CH1_SPI_RES"
  27. #define CH2_SPI_RES "CH2_SPI_RES"
  28. #define CH1_BRD_DET "CH1_BRD_DET"
  29. #define CH2_BRD_DET "CH2_BRD_DET"
  30. extern char *ctrl_device_name;
  31. int8_t ctrl_init(device_t* attr, char *device, uint16_t size);
  32. int8_t ctrl_transfer(device_t *attr);
  33. void ctrl_release(device_t *attr);
  34. char* get_ctrl_data(int channel, int state, int fn);
  35. #endif /* BF16_CTRLDEVICE_H */