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.

22 lines
479 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. #include <stdbool.h>
  2. #include <stdint.h>
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include "main.h"
  6. #include "usart.h"
  7. #define READ_CMD 0x80
  8. #define SPI_TIMEOUT_VALUE 1000
  9. #define SPI_CS_Enable() HAL_GPIO_WritePin(SPI_SEL_GPIO_Port, SPI_SEL_Pin, GPIO_PIN_RESET)
  10. #define SPI_CS_Disable() HAL_GPIO_WritePin(SPI_SEL_GPIO_Port, SPI_SEL_Pin, GPIO_PIN_SET)
  11. void user_main()
  12. {
  13. uint8_t temp;
  14. while (1)
  15. {
  16. // HAL_UART_Transmit(&huart1, &temp, 1, 100);
  17. HAL_Delay(100);
  18. }
  19. }