nxp_rddrone-uavcan146 add board functions supporting pwm_out

This commit is contained in:
David Sidrane 2020-09-28 13:43:11 -07:00 committed by David Sidrane
parent d4fb063651
commit d3fdb2b6ad
3 changed files with 42 additions and 0 deletions

View File

@ -164,6 +164,25 @@ int s32k1xx_bringup(void);
void s32k1xx_spidev_initialize(void);
#endif
/****************************************************************************************************
* Name: board_spi_reset board_peripheral_reset
*
* Description:
* Called to reset SPI and the perferal bus
*
****************************************************************************************************/
void board_peripheral_reset(int ms);
/************************************************************************************
* Name: ucans32k_timer_initialize
*
* Description:
* Called to configure the FTM to provide 1 Mhz
*
************************************************************************************/
void ucans32k_timer_initialize(void);
#include <px4_platform_common/board_common.h>
#endif /* __ASSEMBLY__ */

View File

@ -97,3 +97,22 @@ int board_app_initialize(uintptr_t arg)
return s32k1xx_bringup();
#endif
}
/************************************************************************************
* Name: board_peripheral_reset
*
* Description:
*
************************************************************************************/
__EXPORT void board_peripheral_reset(int ms)
{
/* set the peripheral rails off */
/* wait for the peripheral rail to reach GND */
usleep(ms * 1000);
syslog(LOG_DEBUG, "reset done, %d ms\n", ms);
/* re-enable power */
/* switch the peripheral rail back on */
}

View File

@ -193,4 +193,8 @@ uint8_t s32k1xx_lpspi2status(FAR struct spi_dev_s *dev, uint32_t devid)
}
#endif
__EXPORT void board_spi_reset(int ms, int bus_mask)
{
}
#endif /* CONFIG_S32K1XX_LPSPI0 || CONFIG_S32K1XX_LPSPI01 || CONFIG_S32K1XX_LPSPI2 */