SAM Brown Out Detector Driver.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | bod_config |
Configuration structure for a BOD module. More... | |
Enumerations | |
enum | bod { BOD_BOD33 } |
Brown Out Detector hardware instance IDs. More... | |
enum | bod_action { BOD_ACTION_NONE = SYSCTRL_BOD33_ACTION(0), BOD_ACTION_RESET = SYSCTRL_BOD33_ACTION(1), BOD_ACTION_INTERRUPT = SYSCTRL_BOD33_ACTION(2) } |
Brown Out Detector detection actions. More... | |
enum | bod_mode { BOD_MODE_CONTINUOUS = 0, BOD_MODE_SAMPLED = SYSCTRL_BOD33_MODE } |
Brown Out Detector sampling modes. More... | |
enum | bod_prescale { BOD_PRESCALE_DIV_2 = SYSCTRL_BOD33_PSEL(0), BOD_PRESCALE_DIV_4 = SYSCTRL_BOD33_PSEL(1), BOD_PRESCALE_DIV_8 = SYSCTRL_BOD33_PSEL(2), BOD_PRESCALE_DIV_16 = SYSCTRL_BOD33_PSEL(3), BOD_PRESCALE_DIV_32 = SYSCTRL_BOD33_PSEL(4), BOD_PRESCALE_DIV_64 = SYSCTRL_BOD33_PSEL(5), BOD_PRESCALE_DIV_128 = SYSCTRL_BOD33_PSEL(6), BOD_PRESCALE_DIV_256 = SYSCTRL_BOD33_PSEL(7), BOD_PRESCALE_DIV_512 = SYSCTRL_BOD33_PSEL(8), BOD_PRESCALE_DIV_1024 = SYSCTRL_BOD33_PSEL(9), BOD_PRESCALE_DIV_2048 = SYSCTRL_BOD33_PSEL(10), BOD_PRESCALE_DIV_4096 = SYSCTRL_BOD33_PSEL(11), BOD_PRESCALE_DIV_8192 = SYSCTRL_BOD33_PSEL(12), BOD_PRESCALE_DIV_16384 = SYSCTRL_BOD33_PSEL(13), BOD_PRESCALE_DIV_32768 = SYSCTRL_BOD33_PSEL(14), BOD_PRESCALE_DIV_65536 = SYSCTRL_BOD33_PSEL(15) } |
Brown Out Detector input clock prescale values. More... | |
Functions | |
Configuration and Initialization | |
static void | bod_get_config_defaults (struct bod_config *const conf) |
Get default BOD configuration. More... | |
enum status_code | bod_set_config (const enum bod bod_id, struct bod_config *const conf) |
Configure a Brown Out Detector module. More... | |
static enum status_code | bod_enable (const enum bod bod_id) |
Enables a configured BOD module. More... | |
static enum status_code | bod_disable (const enum bod bod_id) |
Disables an enabled BOD module. More... | |
static bool | bod_is_detected (const enum bod bod_id) |
Checks if a specified BOD low voltage detection has occurred. More... | |
static void | bod_clear_detected (const enum bod bod_id) |
Clears the low voltage detection state of a specified BOD. More... | |