api-hal-gpio.c 524 B

1234567891011121314151617181920212223242526
  1. #include "api-hal-gpio.h"
  2. // init GPIO
  3. void hal_gpio_init(
  4. const GpioPin* gpio,
  5. const GpioMode mode,
  6. const GpioPull pull,
  7. const GpioSpeed speed) {
  8. // TODO: Alternate Functions
  9. GPIO_InitTypeDef GPIO_InitStruct = {0};
  10. GPIO_InitStruct.Pin = gpio->pin;
  11. GPIO_InitStruct.Mode = mode;
  12. GPIO_InitStruct.Pull = pull;
  13. GPIO_InitStruct.Speed = speed;
  14. HAL_GPIO_Init(gpio->port, &GPIO_InitStruct);
  15. }
  16. bool hal_gpio_read_sd_detect(void) {
  17. return true;
  18. }
  19. void enable_cc1101_irq() {
  20. }