Tiva TM4C-1294 Launchpad: tiva_appinit.c is a better home for board_pwm_setup() vs. tiva_bringup.c

This commit is contained in:
Gregory Nutt 2016-08-05 13:05:41 -06:00
parent 7048d08123
commit 5407a673fc
4 changed files with 33 additions and 29 deletions

View File

@ -43,6 +43,8 @@
#include "tm4c1294-launchpad.h"
#ifdef CONFIG_LIB_BOARDCTL
/****************************************************************************
* Public Functions
****************************************************************************/
@ -84,3 +86,27 @@ int board_app_initialize(uintptr_t arg)
return OK;
#endif
}
/****************************************************************************
* Name: board_pwm_setup
*
* Description:
* No implementation for now, it's called by PWM tool via boardctl().
* See include/nuttx/board.h
*
* Input Parameters:
* None.
*
* Returned Value:
* Zero on Success.
*
****************************************************************************/
#ifdef CONFIG_BOARDCTL_PWMTEST
int board_pwm_setup(void)
{
return OK;
}
#endif /* CONFIG_BOARDCTL_PWMTEST */
#endif /* CONFIG_LIB_BOARDCTL */

View File

@ -43,7 +43,6 @@
#include <stdint.h>
#include <debug.h>
#include <nuttx/board.h>
#include <nuttx/i2c/i2c_master.h>
#include <arch/board/board.h>
@ -51,9 +50,6 @@
#include "tiva_pwm.h"
#include "tm4c1294-launchpad.h"
#define PWM_PATH_FMT "/dev/pwm%d"
#define PWM_PATH_FMTLEN (10)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@ -66,6 +62,9 @@
# define HAVE_PWM
#endif
#define PWM_PATH_FMT "/dev/pwm%d"
#define PWM_PATH_FMTLEN (10)
/****************************************************************************
* Private Functions
****************************************************************************/
@ -262,26 +261,3 @@ int tm4c_bringup(void)
return OK;
}
/****************************************************************************
* Name: board_pwm_setup
*
* Description:
* No implementation for now, it's called by PWM tool via boardctl().
* See include/nuttx/board.h
*
* Input Parameters:
* None.
*
* Returned Value:
* Zero on Success.
*
****************************************************************************/
#ifdef CONFIG_BOARDCTL_PWMTEST
int board_pwm_setup(void)
{
return OK;
}
#endif

View File

@ -73,7 +73,8 @@
*
* Description:
* This is a helper function that can be used to encapsulate and manage
* a sequence of SPI transfers.
* a sequence of SPI transfers. The SPI bus will be locked and the
* SPI device selected for the duration of the transfers.
*
* Input Parameters:
* spi - An instance of the SPI device to use for the transfer

View File

@ -132,7 +132,8 @@ struct spi_sequence_s
*
* Description:
* This is a helper function that can be used to encapsulate and manage
* a sequence of SPI transfers.
* a sequence of SPI transfers. The SPI bus will be locked and the
* SPI device selected for the duration of the transfers.
*
* Input Parameters:
* spi - An instance of the SPI device to use for the transfer