15#ifndef LIBBSP_ARM_ATSAM_POWER_H
16#define LIBBSP_ARM_ATSAM_POWER_H
53 atsam_power_state state
124void atsam_power_change_state(
127 atsam_power_state state
141void atsam_power_handler_peripheral(
143 atsam_power_state state
157void atsam_power_handler_clock_driver(
159 atsam_power_state state
174void atsam_power_handler_rtc_driver(
176 atsam_power_state state
184void atsam_power_handler_sleep_mode(
186 atsam_power_state state
196void atsam_power_handler_wait_mode(
198 atsam_power_state state
207#define ATSAM_POWER_PERIPHERAL(f, l) \
209 .handler = atsam_power_handler_peripheral, \
210 .data = { .peripherals = { .first = f, .last = l } } \
213#define ATSAM_POWER_HANDLER(h, a) \
216 .data = { .arg = a } \
219#define ATSAM_POWER_CLOCK_DRIVER \
220 { .handler = atsam_power_handler_clock_driver }
222#define ATSAM_POWER_SLEEP_MODE \
223 { .handler = atsam_power_handler_sleep_mode }
225#define ATSAM_POWER_WAIT_MODE \
226 { .handler = atsam_power_handler_wait_mode }
240} atsam_power_data_rtc_driver;
249#define ATSAM_POWER_RTC_DRIVER(a) \
251 .handler = atsam_power_handler_rtc_driver, \
252 .data = { .arg = a } \
Control structure for power control handling.
Definition: power.h:47
void(* handler)(const struct atsam_power_control *control, atsam_power_state state)
Data pointer to the handler with its desired state.
Definition: power.h:51
union atsam_power_control::@7 data
Data chunk that is used by the handler.
Definition: intercom.c:74