mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11830 from yarbcy/pr/dev-arm-issue-11746
Cypress: Add implementation of free() for gpiopull/11836/head
commit
f3f919e904
|
@ -60,6 +60,12 @@ uint16_t analogin_read_u16(analogin_t *obj)
|
||||||
return cyhal_adc_read_u16(&(obj->hal_adc_channel));
|
return cyhal_adc_read_u16(&(obj->hal_adc_channel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void analogin_free(analogin_t *obj)
|
||||||
|
{
|
||||||
|
cyhal_adc_channel_free(&(obj->hal_adc_channel));
|
||||||
|
cyhal_adc_free(obj->hal_adc);
|
||||||
|
}
|
||||||
|
|
||||||
const PinMap *analogin_pinmap(void)
|
const PinMap *analogin_pinmap(void)
|
||||||
{
|
{
|
||||||
return PinMap_ADC;
|
return PinMap_ADC;
|
||||||
|
|
|
@ -87,6 +87,11 @@ void gpio_dir(gpio_t *obj, PinDirection direction)
|
||||||
apply_config(obj);
|
apply_config(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gpio_free(gpio_t *obj)
|
||||||
|
{
|
||||||
|
cyhal_gpio_free(obj->pin);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -281,6 +281,12 @@ void i2c_abort_asynch(i2c_t *obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void i2c_free(i2c_t *obj)
|
||||||
|
{
|
||||||
|
struct i2c_s *i2c = cy_get_i2c(obj);
|
||||||
|
cyhal_i2c_free(&i2c->hal_i2c);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue