Browse Source

nxp_rddrone-uavcan146 add board functions supporting pwm_out

sbg
David Sidrane 4 years ago committed by David Sidrane
parent
commit
d3fdb2b6ad
  1. 19
      boards/nxp/rddrone-uavcan146/src/board_config.h
  2. 19
      boards/nxp/rddrone-uavcan146/src/init.c
  3. 4
      boards/nxp/rddrone-uavcan146/src/spi.c

19
boards/nxp/rddrone-uavcan146/src/board_config.h

@ -164,6 +164,25 @@ int s32k1xx_bringup(void);
void s32k1xx_spidev_initialize(void); void s32k1xx_spidev_initialize(void);
#endif #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> #include <px4_platform_common/board_common.h>
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */

19
boards/nxp/rddrone-uavcan146/src/init.c

@ -97,3 +97,22 @@ int board_app_initialize(uintptr_t arg)
return s32k1xx_bringup(); return s32k1xx_bringup();
#endif #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 */
}

4
boards/nxp/rddrone-uavcan146/src/spi.c

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

Loading…
Cancel
Save