board.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * This file is free software: you can redistribute it and/or modify it
  3. * under the terms of the GNU General Public License as published by the
  4. * Free Software Foundation, either version 3 of the License, or
  5. * (at your option) any later version.
  6. *
  7. * This file is distributed in the hope that it will be useful, but
  8. * WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. * See the GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License along
  13. * with this program. If not, see <http://www.gnu.org/licenses/>.
  14. *
  15. * Code by Andrew Tridgell and Siddharth Bharat Purohit
  16. */
  17. #pragma once
  18. #include "hwdef.h"
  19. #ifndef HAL_BOARD_INIT_HOOK_DEFINE
  20. #define HAL_BOARD_INIT_HOOK_DEFINE
  21. #endif
  22. #ifndef HAL_BOARD_INIT_HOOK_CALL
  23. #define HAL_BOARD_INIT_HOOK_CALL
  24. #endif
  25. // default to interrupts on port D
  26. #ifndef HAL_GPIO_INTERRUPT_PORT
  27. #define HAL_GPIO_INTERRUPT_PORT EXT_MODE_GPIOD
  28. #endif
  29. #if !defined(_FROM_ASM_)
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. void boardInit(void);
  34. HAL_BOARD_INIT_HOOK_DEFINE
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* _FROM_ASM_ */