单导联心电记录仪
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.7 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. #pragma once
  2. #include <stdio.h>
  3. #include "nrf_drv_saadc.h"
  4. #include "nrf_drv_twi.h"
  5. #include "sys.h"
  6. /*******************************************************************************
  7. * DEBUG_LIGHT *
  8. *******************************************************************************/
  9. void debug_light_init(int io_index);
  10. /*******************************************************************************
  11. * zbsp_enter_sleep *
  12. *******************************************************************************/
  13. /**
  14. * @brief
  15. *
  16. * @param after_ms
  17. * @param wakeup_io_index
  18. */
  19. void zbsp_enter_sleep(int32_t after_ms, int32_t wakeup_io_index, bool mirror);
  20. /*******************************************************************************
  21. * gpio_io_state_monitor *
  22. *******************************************************************************/
  23. void zbsp_gpio_state_monitor(int dumpstate_period, uint8_t* io_index, int32_t nio);
  24. void zbsp_gpio_state_monitor_without_initio(int dumpstate_period, uint8_t* io_index, int32_t nio);
  25. void board_init();
  26. /*******************************************************************************
  27. * ADC *
  28. *******************************************************************************/
  29. void adc_module_init();
  30. void adc_module_battery_channel_init(nrf_saadc_input_t channelpin);
  31. int16_t adc_module_battery_channel_read_val();
  32. void adc_module_heart_elect_channel_init(nrf_saadc_input_t channelpin);
  33. int16_t adc_module_heart_elect_channel_read_val();
  34. /*******************************************************************************
  35. * SPI *
  36. *******************************************************************************/
  37. void board_spi_init();
  38. ret_code_t board_spi_transfer(uint8_t const* p_tx_buffer, uint8_t tx_buffer_length, uint8_t* p_rx_buffer, uint8_t rx_buffer_length);
  39. ret_code_t board_spi_transfer_test();
  40. void board_i2c_init();
  41. void board_i2c_write(uint8_t addr, uint8_t* data, uint8_t len);
  42. void screen_init();
  43. void screen_spi_translate_onebyte();
  44. /*******************************************************************************
  45. * FATFS *
  46. *******************************************************************************/
  47. void fatfs_init();
  48. void fatfs_test_write();
  49. void pwm_trigger();
  50. void wd_init();
  51. void wd_feed();