RTX_Config.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*----------------------------------------------------------------------------
  2. * CMSIS-RTOS - RTX
  3. *----------------------------------------------------------------------------
  4. * Name: RTX_CONFIG.H
  5. * Purpose: Exported functions of RTX_Config.c
  6. * Rev.: V4.81
  7. *----------------------------------------------------------------------------
  8. *
  9. * Copyright (c) 1999-2009 KEIL, 2009-2017 ARM Germany GmbH. All rights reserved.
  10. *
  11. * SPDX-License-Identifier: Apache-2.0
  12. *
  13. * Licensed under the Apache License, Version 2.0 (the License); you may
  14. * not use this file except in compliance with the License.
  15. * You may obtain a copy of the License at
  16. *
  17. * www.apache.org/licenses/LICENSE-2.0
  18. *
  19. * Unless required by applicable law or agreed to in writing, software
  20. * distributed under the License is distributed on an AS IS BASIS, WITHOUT
  21. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22. * See the License for the specific language governing permissions and
  23. * limitations under the License.
  24. *---------------------------------------------------------------------------*/
  25. #include <stdint.h>
  26. /* Error Codes */
  27. #define OS_ERR_STK_OVF 1U
  28. #define OS_ERR_FIFO_OVF 2U
  29. #define OS_ERR_MBX_OVF 3U
  30. #define OS_ERR_TIMER_OVF 4U
  31. /* Definitions */
  32. #define BOX_ALIGN_8 0x80000000U
  33. #define _declare_box(pool,size,cnt) U32 pool[(((size)+3)/4)*(cnt) + 3]
  34. #define _declare_box8(pool,size,cnt) U64 pool[(((size)+7)/8)*(cnt) + 2]
  35. #define _init_box8(pool,size,bsize) _init_box (pool,size,(bsize) | BOX_ALIGN_8)
  36. /* Variables */
  37. extern U32 mp_tcb[];
  38. extern U64 mp_stk[];
  39. extern U32 os_fifo[];
  40. extern void *os_active_TCB[];
  41. /* Constants */
  42. extern U16 const os_maxtaskrun;
  43. extern U32 const os_trv;
  44. extern U8 const os_flags;
  45. extern U32 const os_stackinfo;
  46. extern U32 const os_rrobin;
  47. extern U32 const os_clockrate;
  48. extern U32 const os_timernum;
  49. extern U16 const mp_tcb_size;
  50. extern U32 const mp_stk_size;
  51. extern U32 const *m_tmr;
  52. extern U16 const mp_tmr_size;
  53. extern U8 const os_fifo_size;
  54. /* Functions */
  55. extern void os_idle_demon (void);
  56. extern S32 os_tick_init (void);
  57. extern U32 os_tick_val (void);
  58. extern U32 os_tick_ovf (void);
  59. extern void os_tick_irqack (void);
  60. extern void os_tmr_call (U16 info);
  61. extern void os_error (uint32_t err_code);
  62. /*----------------------------------------------------------------------------
  63. * end of file
  64. *---------------------------------------------------------------------------*/