SAM Brown Out Detector Driver.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | bod12_config |
Configuration structure for a BOD12 module. More... | |
struct | bod33_config |
Configuration structure for a BOD33 module. More... | |
Enumerations | |
enum | bod12_action { BOD12_ACTION_NONE = SUPC_BOD12_ACTION(0), BOD12_ACTION_RESET = SUPC_BOD12_ACTION(1), BOD12_ACTION_INTERRUPT = SUPC_BOD12_ACTION(2) } |
Brown Out Detector detection actions. More... | |
enum | bod12_mode_in_active { BOD12_ACTCFG_CONTINUOUS = 0, BOD12_ACTCFG_SAMPLED = SUPC_BOD12_ACTCFG } |
Brown Out Detector sampling modes in active sleep mode. More... | |
enum | bod12_mode_in_standby { BOD12_STDBYCFG_CONTINUOUS = 0, BOD12_STDBYCFG_SAMPLED = SUPC_BOD12_STDBYCFG } |
Brown Out Detector sampling modes in standby sleep mode. More... | |
enum | bod12_prescale { BOD12_PRESCALE_DIV_2 = SUPC_BOD12_PSEL(0), BOD12_PRESCALE_DIV_4 = SUPC_BOD12_PSEL(1), BOD12_PRESCALE_DIV_8 = SUPC_BOD12_PSEL(2), BOD12_PRESCALE_DIV_16 = SUPC_BOD12_PSEL(3), BOD12_PRESCALE_DIV_32 = SUPC_BOD12_PSEL(4), BOD12_PRESCALE_DIV_64 = SUPC_BOD12_PSEL(5), BOD12_PRESCALE_DIV_128 = SUPC_BOD12_PSEL(6), BOD12_PRESCALE_DIV_256 = SUPC_BOD12_PSEL(7), BOD12_PRESCALE_DIV_512 = SUPC_BOD12_PSEL(8), BOD12_PRESCALE_DIV_1024 = SUPC_BOD12_PSEL(9), BOD12_PRESCALE_DIV_2048 = SUPC_BOD12_PSEL(10), BOD12_PRESCALE_DIV_4096 = SUPC_BOD12_PSEL(11), BOD12_PRESCALE_DIV_8192 = SUPC_BOD12_PSEL(12), BOD12_PRESCALE_DIV_16384 = SUPC_BOD12_PSEL(13), BOD12_PRESCALE_DIV_32768 = SUPC_BOD12_PSEL(14), BOD12_PRESCALE_DIV_65536 = SUPC_BOD12_PSEL(15) } |
Brown Out Detector input clock prescale values. More... | |
enum | bod33_action { BOD33_ACTION_NONE = SUPC_BOD33_ACTION(0), BOD33_ACTION_RESET = SUPC_BOD33_ACTION(1), BOD33_ACTION_INTERRUPT = SUPC_BOD33_ACTION(2), BOD33_ACTION_BACKUP = SUPC_BOD33_ACTION(3) } |
Brown Out Detector detection actions. More... | |
enum | bod33_mode_in_active { BOD33_ACTCFG_CONTINUOUS = 0, BOD33_ACTCFG_SAMPLED = SUPC_BOD33_ACTCFG } |
Brown Out Detector sampling modes in active sleep mode. More... | |
enum | bod33_mode_in_standby { BOD33_STDBYCFG_CONTINUOUS = 0, BOD33_STDBYCFG_SAMPLED = SUPC_BOD33_STDBYCFG } |
Brown Out Detector sampling modes in standby sleep mode. More... | |
enum | bod33_prescale { BOD33_PRESCALE_DIV_2 = SUPC_BOD33_PSEL(0), BOD33_PRESCALE_DIV_4 = SUPC_BOD33_PSEL(1), BOD33_PRESCALE_DIV_8 = SUPC_BOD33_PSEL(2), BOD33_PRESCALE_DIV_16 = SUPC_BOD33_PSEL(3), BOD33_PRESCALE_DIV_32 = SUPC_BOD33_PSEL(4), BOD33_PRESCALE_DIV_64 = SUPC_BOD33_PSEL(5), BOD33_PRESCALE_DIV_128 = SUPC_BOD33_PSEL(6), BOD33_PRESCALE_DIV_256 = SUPC_BOD33_PSEL(7), BOD33_PRESCALE_DIV_512 = SUPC_BOD33_PSEL(8), BOD33_PRESCALE_DIV_1024 = SUPC_BOD33_PSEL(9), BOD33_PRESCALE_DIV_2048 = SUPC_BOD33_PSEL(10), BOD33_PRESCALE_DIV_4096 = SUPC_BOD33_PSEL(11), BOD33_PRESCALE_DIV_8192 = SUPC_BOD33_PSEL(12), BOD33_PRESCALE_DIV_16384 = SUPC_BOD33_PSEL(13), BOD33_PRESCALE_DIV_32768 = SUPC_BOD33_PSEL(14), BOD33_PRESCALE_DIV_65536 = SUPC_BOD33_PSEL(15) } |
Brown Out Detector input clock prescale values. More... | |
enum | bod33_vol_monitor { BOD33_VMON_VDD = 0, BOD33_VMON_VBAT = SUPC_BOD33_VMON } |
Brown Out Detector voltage monitors. More... | |
Functions | |
Configuration and Initialization | |
static void | bod33_get_config_defaults (struct bod33_config *const conf) |
Get default BOD33 configuration. More... | |
enum status_code | bod33_set_config (struct bod33_config *const conf) |
Configure a Brown Out Detector module. More... | |
static enum status_code | bod33_enable (void) |
Enables a configured BOD33 module. More... | |
static enum status_code | bod33_disable (void) |
Disables an enabled BOD33 module. More... | |
static bool | bod33_is_detected (void) |
Checks if the BOD33 low voltage detection has occurred. More... | |
static void | bod33_clear_detected (void) |
Clears the low voltage detection state of the BOD33. More... | |
static void | bod12_get_config_defaults (struct bod12_config *const conf) |
Get default BOD12 configuration. More... | |
enum status_code | bod12_set_config (struct bod12_config *const conf) |
Configure a Brown Out Detector module. More... | |
static enum status_code | bod12_enable (void) |
Enables a configured BOD12 module. More... | |
static enum status_code | bod12_disable (void) |
Disables an enabled BOD12 module. More... | |
static bool | bod12_is_detected (void) |
Checks if the BOD12 low voltage detection has occurred. More... | |
static void | bod12_clear_detected (void) |
Clears the low voltage detection state of the BOD12. More... | |