Add function to configure a pin to a default state
This commit is contained in:
parent
3877190196
commit
ad52d68a0c
2 changed files with 23 additions and 0 deletions
|
@ -396,6 +396,17 @@ lpm_init()
|
|||
list_init(power_domain_locks_list);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
lpm_pin_set_default_state(uint32_t ioid)
|
||||
{
|
||||
if(ioid == IOID_UNUSED) {
|
||||
return;
|
||||
}
|
||||
|
||||
ti_lib_ioc_port_configure_set(ioid, IOC_PORT_GPIO, IOC_STD_OUTPUT);
|
||||
ti_lib_gpio_dir_mode_set((1 << ioid), GPIO_DIR_MODE_IN);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
|
|
|
@ -154,6 +154,18 @@ void lpm_register_module(lpm_registered_module_t *module);
|
|||
* \brief Initialise the low-power mode management module
|
||||
*/
|
||||
void lpm_init(void);
|
||||
|
||||
/**
|
||||
* \brief Sets an IOID to a default state
|
||||
* \param ioid IOID_0...
|
||||
*
|
||||
* This will set ioid to sw control, input, no pull. Input buffer and output
|
||||
* driver will both be disabled
|
||||
*
|
||||
* The function will do nothing if ioid == IOID_UNUSED, so the caller does not
|
||||
* have to check board configuration before calling this.
|
||||
*/
|
||||
void lpm_pin_set_default_state(uint32_t ioid);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#endif /* LPM_H_ */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in a new issue