| | |
| | | /* |
| | | * Copyright (c) 2019-2023 Beijing Hanwei Innovation Technology Ltd. Co. and |
| | | * Copyright (c) 2019-2025 Beijing Hanwei Innovation Technology Ltd. Co. and |
| | | * its subsidiaries and affiliates (collectly called MKSEMI). |
| | | * |
| | | * All rights reserved. |
| | |
| | | |
| | | #ifndef MK_COMMON_H_ |
| | | #define MK_COMMON_H_ |
| | | |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | | |
| | | #include <stddef.h> |
| | | #include <stdint.h> |
| | |
| | | // check RAM address and Word alignment |
| | | #define CHK_RAM_WORD_ADDR(x) (((uint32_t)(x)&0xFFFC0003) == SRAM_BASE) |
| | | |
| | | /** The minimum power down time, 65X 32768 ticks, 1983us(~2000us) */ |
| | | #define POWER_DOWN_TIME_TICK_MIN (65U) |
| | | |
| | | /// interrupt priority |
| | | enum IRQ_PRIORITY_LEVEL_T |
| | | { |
| | |
| | | IRQ_PRIORITY_HIGH = 1, |
| | | IRQ_PRIORITY_NORMAL = 2, |
| | | IRQ_PRIORITY_LOW = 3, |
| | | IRQ_PRIORITY_NONE = 4, |
| | | }; |
| | | |
| | | #ifdef __cplusplus |
| | | extern "C" { |
| | | #endif |
| | | |
| | | /** |
| | | * @brief Disable global interrupt. |
| | | * |