0.3.1
|
Macros | |
#define | CPU_WDT_WTCNT(x) (0x5A00U | ((x) & 0x00FF)) |
Value to write to the CPU-WDT WTCNTW register. | |
#define | CPU_WDT_WTCSR(x) (0xA500U | ((x) & 0x00FF)) |
Value to write to the CPU-WDT WTCSRW register. | |
#define | CPU_WDT_CLEAR_WOVF_RSTCSR (0xA500U) |
Value to write to the CPU-WDT RSTCSRW register. | |
#define | CPU_WDT_CLEAR_RSTCSR(x) (0x5A3FU | ((x) & 0x00FF)) |
Value to write to the CPU-WDT RSTCSRW register. | |
Typedefs | |
typedef enum cpu_wdt_clock | cpu_wdt_clock_t |
CPU-WDT clock divisors. | |
typedef enum cpu_wdt_mode | cpu_wdt_mode_t |
CPU-WDT modes. | |
typedef void(* | cpu_wdt_ihr_t) (void) |
Callback type. | |
Enumerations | |
enum | cpu_wdt_clock |
CPU-WDT clock divisors. More... | |
enum | cpu_wdt_mode |
CPU-WDT modes. More... | |
Functions | |
static void | cpu_wdt_count_set (uint8_t count) |
Set the 1-byte WDT tick count. | |
static uint8_t | cpu_wdt_count_get (void) |
Obtain the current 1-byte WDT tick count. | |
static void | cpu_wdt_enable (void) |
Enable the CPU-WDT. | |
static void | cpu_wdt_disable (void) |
Disable the CPU-WDT. | |
static uint8_t | cpu_wdt_interrupt_priority_get (void) |
Obtain the interrupt priority level for CPU-WDT. | |
static void | cpu_wdt_interrupt_priority_set (uint8_t priority) |
Set the interrupt priority level for CPU-WDT. | |
void | cpu_wdt_init (cpu_wdt_clock_t clock_div) |
Fully initialize the CPU-WDT depending with a specific clock divisor. | |
Description goes here.
#define CPU_WDT_WTCNT | ( | x | ) | (0x5A00U | ((x) & 0x00FF)) |
Value to write to the CPU-WDT WTCNTW register.
x | The 2-byte value. |
#define CPU_WDT_WTCSR | ( | x | ) | (0xA500U | ((x) & 0x00FF)) |
#define CPU_WDT_CLEAR_WOVF_RSTCSR (0xA500U) |
Value to write to the CPU-WDT RSTCSRW register.
#define CPU_WDT_CLEAR_RSTCSR | ( | x | ) | (0x5A3FU | ((x) & 0x00FF)) |
Value to write to the CPU-WDT RSTCSRW register.
x | The 2-byte value. |
typedef enum cpu_wdt_clock cpu_wdt_clock_t |
CPU-WDT clock divisors.
typedef enum cpu_wdt_mode cpu_wdt_mode_t |
CPU-WDT modes.
typedef void(* cpu_wdt_ihr_t) (void) |
Callback type.
enum cpu_wdt_clock |
CPU-WDT clock divisors.
enum cpu_wdt_mode |
CPU-WDT modes.
Enumerator | |
---|---|
CPU_WDT_MODE_INTERVAL | Interval mode. |
CPU_WDT_MODE_WATCHDOG | Watchdog mode. |
|
inlinestatic |
Set the 1-byte WDT tick count.
count | The 1-byte tick value to set. |
|
inlinestatic |
Obtain the current 1-byte WDT tick count.
|
inlinestatic |
Obtain the interrupt priority level for CPU-WDT.
0
to 15
.
|
inlinestatic |
Set the interrupt priority level for CPU-WDT.
priority | The priority ranging from 0 to 15 . |
void cpu_wdt_init | ( | cpu_wdt_clock_t | clock_div | ) |
Fully initialize the CPU-WDT depending with a specific clock divisor.
clock_div | The clock divisor. |