*/
int peripheral_adc_open(int device, int channel, peripheral_adc_h *adc)
{
+ RETVM_IF(!peripheral_is_privilege_supported(), PERIPHERAL_ERROR_PERMISSION_DENIED, "Peripheral-io privilege is not supported");
RETVM_IF(!__is_feature_supported(), PERIPHERAL_ERROR_NOT_SUPPORTED, "ADC feature is not supported");
RETVM_IF(adc == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid adc handle");
RETVM_IF(device < 0, PERIPHERAL_ERROR_INVALID_PARAMETER, "Invalid adc device number");
*/
int peripheral_adc_close(peripheral_adc_h adc)
{
+ RETVM_IF(!peripheral_is_privilege_supported(), PERIPHERAL_ERROR_PERMISSION_DENIED, "Peripheral-io privilege is not supported");
RETVM_IF(!__is_feature_supported(), PERIPHERAL_ERROR_NOT_SUPPORTED, "ADC feature is not supported");
RETVM_IF(adc == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "adc handle is NULL");
*/
int peripheral_adc_read(peripheral_adc_h adc, uint32_t *value)
{
+ RETVM_IF(!peripheral_is_privilege_supported(), PERIPHERAL_ERROR_PERMISSION_DENIED, "Peripheral-io privilege is not supported");
RETVM_IF(!__is_feature_supported(), PERIPHERAL_ERROR_NOT_SUPPORTED, "ADC feature is not supported");
RETVM_IF(adc == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "adc handle is NULL");
RETVM_IF(value == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "adc read value is invalid");