resource_map.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (c) 2022 OpenLuat & AirM2M
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a copy of
  5. * this software and associated documentation files (the "Software"), to deal in
  6. * the Software without restriction, including without limitation the rights to
  7. * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  8. * the Software, and to permit persons to whom the Software is furnished to do so,
  9. * subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in all
  12. * copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  16. * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  17. * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  18. * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  19. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  20. */
  21. #ifndef __RESOURCE_MAP_H__
  22. #define __RESOURCE_MAP_H__
  23. #include "io_map.h"
  24. #define CORE_TICK_TIM 7
  25. #define CORE_TICK_IRQ TIM0_7_IRQn
  26. #define CORE_TICK_1US (48)
  27. #define CORE_TICK_1MS (48000)
  28. #define CORE_TICK_1S (48000000)
  29. #define CORE_TICK_IRQ_LEVEL 1
  30. #define HWTIMER_IRQ_LEVEL 0
  31. #define SYS_TIMER_TIM 6
  32. #define SYS_TIMER_IRQ TIM0_6_IRQn
  33. #define SYS_TIMER_1US (48)
  34. #define SYS_TIMER_1MS (48000)
  35. #define SYS_TIMER_1S (48000000)
  36. #define SYS_TIMER_IRQ_LEVEL 6
  37. #define DBG_UART_ID UART_ID0
  38. #define DBG_UART_BR 1500000
  39. #define BL_UART_BR 3000000
  40. #define DBG_UART_IRQ_LEVEL 6
  41. #define DBG_UART_TX_DMA_STREAM DMA1_STREAM_2
  42. #define DBG_UART_RX_DMA_STREAM DMA1_STREAM_2
  43. #define DBG_UART_TX_DMA_CHANNEL SYSCTRL_PHER_CTRL_DMA_CHx_IF_UART0_TX
  44. #define DBG_UART_RX_DMA_CHANNEL SYSCTRL_PHER_CTRL_DMA_CHx_IF_UART0_RX
  45. #define EFLASH_QSPI_TX_DMA_STREAM DMA1_STREAM_1
  46. #define DAC_TX_DMA_STREAM DMA1_STREAM_0
  47. #define DCMI_RX_DMA_STREAM DMA1_STREAM_3
  48. #define FLASH_SPI_TX_DMA_STREAM DMA1_STREAM_4
  49. #define FLASH_SPI_RX_DMA_STREAM DMA1_STREAM_5
  50. #define LCD_SPI_TX_DMA_STREAM DMA1_STREAM_6
  51. #define LCD_SPI_RX_DMA_STREAM DMA1_STREAM_7
  52. #define LUATOS_TASK_PRO (configMAX_PRIORITIES - 2)
  53. #define HW_TASK_PRO (configMAX_PRIORITIES - 1)
  54. #define SERVICE_TASK_PRO (configMAX_PRIORITIES - 4)
  55. #endif