6#ifndef CAFFEINE_SAL_DEV_BUTTON_H
7#define CAFFEINE_SAL_DEV_BUTTON_H
19#define CFN_SAL_DEV_TYPE_BUTTON CFN_SAL_TYPE('B', 'T', 'N')
86 uint32_t peripheral_id,
94 CFN_HAL_POPULATE_DRIVER(
110 return CFN_HAL_ERROR_BAD_PARAM;
112 driver->base.vmt = (
const struct cfn_hal_api_base_s *) driver->api;
120 return CFN_HAL_ERROR_BAD_PARAM;
130 return CFN_HAL_ERROR_BAD_PARAM;
132 driver->config = config;
139 if (!driver || !config || !driver->config)
141 return CFN_HAL_ERROR_BAD_PARAM;
143 *config = *(driver->config);
144 return CFN_HAL_ERROR_OK;
153 return CFN_HAL_ERROR_BAD_PARAM;
155 driver->cb = callback;
156 driver->cb_user_arg = user_arg;
157 return cfn_hal_base_callback_register(
162 cfn_hal_power_state_t state)
166 return CFN_HAL_ERROR_BAD_PARAM;
175 return CFN_HAL_ERROR_BAD_PARAM;
184 return CFN_HAL_ERROR_BAD_PARAM;
193 return CFN_HAL_ERROR_BAD_PARAM;
202 return CFN_HAL_ERROR_BAD_PARAM;
211 return CFN_HAL_ERROR_BAD_PARAM;
220 return CFN_HAL_ERROR_BAD_PARAM;
230 cfn_hal_error_code_t error = CFN_HAL_ERROR_OK;
237 cfn_hal_error_code_t error = CFN_HAL_ERROR_OK;
244 cfn_hal_error_code_t error = CFN_HAL_ERROR_OK;
251 cfn_hal_error_code_t error = CFN_HAL_ERROR_OK;
258 cfn_hal_error_code_t error = CFN_HAL_ERROR_OK;
266 cfn_hal_error_code_t error = CFN_HAL_ERROR_OK;
Core definitions and macros for Caffeine SAL.
#define CFN_SAL_CREATE_DRIVER_TYPE(prefix, config_type, api_type, phy_type, cb_type)
Definition cfn_sal.h:38
Generic physical mapping for services.
Definition cfn_sal_types.h:26