LLD templates fixed.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5319 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
cced334724
commit
ac598a7b1c
|
@ -221,6 +221,7 @@ typedef struct {
|
||||||
* @brief Bit rate.
|
* @brief Bit rate.
|
||||||
*/
|
*/
|
||||||
uint32_t sc_speed;
|
uint32_t sc_speed;
|
||||||
|
/* End of the mandatory fields.*/
|
||||||
/**
|
/**
|
||||||
* @brief Initialization value for the CR1 register.
|
* @brief Initialization value for the CR1 register.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -221,6 +221,7 @@ typedef struct {
|
||||||
* @brief Bit rate.
|
* @brief Bit rate.
|
||||||
*/
|
*/
|
||||||
uint32_t sc_speed;
|
uint32_t sc_speed;
|
||||||
|
/* End of the mandatory fields.*/
|
||||||
/**
|
/**
|
||||||
* @brief Initialization value for the CR1 register.
|
* @brief Initialization value for the CR1 register.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
* @note The default is @p FALSE.
|
* @note The default is @p FALSE.
|
||||||
*/
|
*/
|
||||||
#if !defined(PLATFORM_ADC_USE_ADC1) || defined(__DOXYGEN__)
|
#if !defined(PLATFORM_ADC_USE_ADC1) || defined(__DOXYGEN__)
|
||||||
#define PLATFORM_ADC_USE_ADC1 FALSE
|
#define PLATFORM_ADC_USE_ADC1 FALSE
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
* @details If set to @p TRUE the support for CAN1 is included.
|
* @details If set to @p TRUE the support for CAN1 is included.
|
||||||
*/
|
*/
|
||||||
#if !defined(PLATFORM_CAN_USE_CAN1) || defined(__DOXYGEN__)
|
#if !defined(PLATFORM_CAN_USE_CAN1) || defined(__DOXYGEN__)
|
||||||
#define PLATFORM_CAN_USE_CAN1 FALSE
|
#define PLATFORM_CAN_USE_CAN1 FALSE
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
* @details If set to @p TRUE the support for EXT1 is included.
|
* @details If set to @p TRUE the support for EXT1 is included.
|
||||||
*/
|
*/
|
||||||
#if !defined(PLATFORM_EXT_USE_EXT1) || defined(__DOXYGEN__)
|
#if !defined(PLATFORM_EXT_USE_EXT1) || defined(__DOXYGEN__)
|
||||||
#define PLATFORM_EXT_USE_EXT1 FALSE
|
#define PLATFORM_EXT_USE_EXT1 FALSE
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
* @details If set to @p TRUE the support for ICU1 is included.
|
* @details If set to @p TRUE the support for ICU1 is included.
|
||||||
*/
|
*/
|
||||||
#if !defined(PLATFORM_ICU_USE_ICU1) || defined(__DOXYGEN__)
|
#if !defined(PLATFORM_ICU_USE_ICU1) || defined(__DOXYGEN__)
|
||||||
#define PLATFORM_ICU_USE_ICU1 FALSE
|
#define PLATFORM_ICU_USE_ICU1 FALSE
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief This implementation supports the zero-copy mode API.
|
* @brief This implementation supports the zero-copy mode API.
|
||||||
*/
|
*/
|
||||||
#define MAC_SUPPORTS_ZERO_COPY TRUE
|
#define MAC_SUPPORTS_ZERO_COPY TRUE
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
* @details If set to @p TRUE the support for MAC1 is included.
|
* @details If set to @p TRUE the support for MAC1 is included.
|
||||||
*/
|
*/
|
||||||
#if !defined(PLATFORM_MAC_USE_MAC1) || defined(__DOXYGEN__)
|
#if !defined(PLATFORM_MAC_USE_MAC1) || defined(__DOXYGEN__)
|
||||||
#define PLATFORM_MAC_USE_MAC1 FALSE
|
#define PLATFORM_MAC_USE_MAC1 FALSE
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,13 @@
|
||||||
/* Driver exported variables. */
|
/* Driver exported variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief PWM1 driver identifier.
|
||||||
|
*/
|
||||||
|
#if PLATFORM_PWM_USE_PWM1 || defined(__DOXYGEN__)
|
||||||
|
PWMDriver PWMD1;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver local variables. */
|
/* Driver local variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -62,6 +69,10 @@
|
||||||
*/
|
*/
|
||||||
void pwm_lld_init(void) {
|
void pwm_lld_init(void) {
|
||||||
|
|
||||||
|
#if PLATFORM_PWM_USE_PWM1
|
||||||
|
/* Driver initialization.*/
|
||||||
|
pwmObjectInit(&PWMD1);
|
||||||
|
#endif /* PLATFORM_PWM_USE_PWM1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,9 +85,15 @@ void pwm_lld_init(void) {
|
||||||
void pwm_lld_start(PWMDriver *pwmp) {
|
void pwm_lld_start(PWMDriver *pwmp) {
|
||||||
|
|
||||||
if (pwmp->state == PWM_STOP) {
|
if (pwmp->state == PWM_STOP) {
|
||||||
/* Clock activation.*/
|
/* Enables the pehipheral.*/
|
||||||
|
#if PLATFORM_PWM_USE_PWM1
|
||||||
|
if (&PWMD1 == pwmp) {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_PWM_USE_PWM1 */
|
||||||
}
|
}
|
||||||
/* Configuration.*/
|
/* Configures the peripheral.*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,6 +105,16 @@ void pwm_lld_start(PWMDriver *pwmp) {
|
||||||
*/
|
*/
|
||||||
void pwm_lld_stop(PWMDriver *pwmp) {
|
void pwm_lld_stop(PWMDriver *pwmp) {
|
||||||
|
|
||||||
|
if (pwmp->state == PWM_READY) {
|
||||||
|
/* Resets the peripheral.*/
|
||||||
|
|
||||||
|
/* Disables the peripheral.*/
|
||||||
|
#if PLATFORM_PWM_USE_PWM1
|
||||||
|
if (&PWMD1 == pwmp) {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_PWM_USE_PWM1 */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -108,6 +135,9 @@ void pwm_lld_stop(PWMDriver *pwmp) {
|
||||||
*/
|
*/
|
||||||
void pwm_lld_change_period(PWMDriver *pwmp, pwmcnt_t period) {
|
void pwm_lld_change_period(PWMDriver *pwmp, pwmcnt_t period) {
|
||||||
|
|
||||||
|
(void)pwmp;
|
||||||
|
(void)period;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -128,6 +158,10 @@ void pwm_lld_enable_channel(PWMDriver *pwmp,
|
||||||
pwmchannel_t channel,
|
pwmchannel_t channel,
|
||||||
pwmcnt_t width) {
|
pwmcnt_t width) {
|
||||||
|
|
||||||
|
(void)pwmp;
|
||||||
|
(void)channel;
|
||||||
|
(void)width;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -146,6 +180,9 @@ void pwm_lld_enable_channel(PWMDriver *pwmp,
|
||||||
*/
|
*/
|
||||||
void pwm_lld_disable_channel(PWMDriver *pwmp, pwmchannel_t channel) {
|
void pwm_lld_disable_channel(PWMDriver *pwmp, pwmchannel_t channel) {
|
||||||
|
|
||||||
|
(void)pwmp;
|
||||||
|
(void)channel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAL_USE_PWM */
|
#endif /* HAL_USE_PWM */
|
||||||
|
|
|
@ -35,16 +35,27 @@
|
||||||
/* Driver constants. */
|
/* Driver constants. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of PWM channels per PWM driver.
|
||||||
|
*/
|
||||||
|
#define PWM_CHANNELS 4
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Number of PWM channels per PWM driver.
|
* @name Configuration options
|
||||||
|
* @{
|
||||||
*/
|
*/
|
||||||
#if !defined(PWM_CHANNELS) || defined(__DOXYGEN__)
|
/**
|
||||||
#define PWM_CHANNELS 1
|
* @brief XXX driver enable switch.
|
||||||
|
* @details If set to @p TRUE the support for XXX1 is included.
|
||||||
|
*/
|
||||||
|
#if !defined(PLATFORM_XXX_USE_XXX1) || defined(__DOXYGEN__)
|
||||||
|
#define PLATFORM_XXX_USE_XXX1 FALSE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
|
@ -151,6 +162,10 @@ struct PWMDriver {
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#if PLATFORM_XXX_USE_XXX1 && !defined(__DOXYGEN__)
|
||||||
|
extern XXXDriver XXXD1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -39,6 +39,13 @@
|
||||||
/* Driver exported variables. */
|
/* Driver exported variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SD1 driver identifier.
|
||||||
|
*/
|
||||||
|
#if PLATFORM_SERIAL_USE_SD1 || defined(__DOXYGEN__)
|
||||||
|
SerialDriver SD1;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver local variables. */
|
/* Driver local variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -47,6 +54,7 @@
|
||||||
* @brief Driver default configuration.
|
* @brief Driver default configuration.
|
||||||
*/
|
*/
|
||||||
static const SerialConfig default_config = {
|
static const SerialConfig default_config = {
|
||||||
|
38400
|
||||||
};
|
};
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -68,6 +76,10 @@ static const SerialConfig default_config = {
|
||||||
*/
|
*/
|
||||||
void sd_lld_init(void) {
|
void sd_lld_init(void) {
|
||||||
|
|
||||||
|
#if PLATFORM_SERIAL_USE_SD1
|
||||||
|
/* Driver initialization.*/
|
||||||
|
sdObjectInit(&SD1);
|
||||||
|
#endif /* PLATFORM_SERIAL_USE_SD1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,6 +97,16 @@ void sd_lld_start(SerialDriver *sdp, const SerialConfig *config) {
|
||||||
if (config == NULL)
|
if (config == NULL)
|
||||||
config = &default_config;
|
config = &default_config;
|
||||||
|
|
||||||
|
if (sdp->state == SD_STOP) {
|
||||||
|
/* Enables the pehipheral.*/
|
||||||
|
#if PLATFORM_SERIAL_USE_SD1
|
||||||
|
if (&SD1 == sdp) {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_SD_USE_SD1 */
|
||||||
|
}
|
||||||
|
/* Configures the peripheral.*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -98,6 +120,16 @@ void sd_lld_start(SerialDriver *sdp, const SerialConfig *config) {
|
||||||
*/
|
*/
|
||||||
void sd_lld_stop(SerialDriver *sdp) {
|
void sd_lld_stop(SerialDriver *sdp) {
|
||||||
|
|
||||||
|
if (sdp->state == SD_READY) {
|
||||||
|
/* Resets the peripheral.*/
|
||||||
|
|
||||||
|
/* Disables the peripheral.*/
|
||||||
|
#if PLATFORM_SERIAL_USE_SD1
|
||||||
|
if (&SD1 == sdp) {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_SERIAL_USE_SD1 */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAL_USE_SERIAL */
|
#endif /* HAL_USE_SERIAL */
|
||||||
|
|
|
@ -39,6 +39,19 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief SD1 driver enable switch.
|
||||||
|
* @details If set to @p TRUE the support for SD1 is included.
|
||||||
|
*/
|
||||||
|
#if !defined(PLATFORM_SERIAL_USE_SD1) || defined(__DOXYGEN__)
|
||||||
|
#define PLATFORM_SERIAL_USE_SD1 FALSE
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -55,7 +68,11 @@
|
||||||
* architecture dependent, fields.
|
* architecture dependent, fields.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
/**
|
||||||
|
* @brief Bit rate.
|
||||||
|
*/
|
||||||
|
uint32_t sc_speed;
|
||||||
|
/* End of the mandatory fields.*/
|
||||||
} SerialConfig;
|
} SerialConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -83,6 +100,10 @@ typedef struct {
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#if PLATFORM_SERIAL_USE_SD1 && !defined(__DOXYGEN__)
|
||||||
|
extern SerialDriver SD1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -39,6 +39,13 @@
|
||||||
/* Driver exported variables. */
|
/* Driver exported variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SPI1 driver identifier.
|
||||||
|
*/
|
||||||
|
#if PLATFORM_SPI_USE_SPI1 || defined(__DOXYGEN__)
|
||||||
|
SPIDriver SPID1;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver local variables. */
|
/* Driver local variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -62,6 +69,10 @@
|
||||||
*/
|
*/
|
||||||
void spi_lld_init(void) {
|
void spi_lld_init(void) {
|
||||||
|
|
||||||
|
#if PLATFORM_SPI_USE_SPI1
|
||||||
|
/* Driver initialization.*/
|
||||||
|
spiObjectInit(&SPID1);
|
||||||
|
#endif /* PLATFORM_SPI_USE_SPI1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,9 +85,15 @@ void spi_lld_init(void) {
|
||||||
void spi_lld_start(SPIDriver *spip) {
|
void spi_lld_start(SPIDriver *spip) {
|
||||||
|
|
||||||
if (spip->state == SPI_STOP) {
|
if (spip->state == SPI_STOP) {
|
||||||
/* Clock activation.*/
|
/* Enables the pehipheral.*/
|
||||||
|
#if PLATFORM_SPI_USE_SPI1
|
||||||
|
if (&SPID1 == spip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_SPI_USE_SPI1 */
|
||||||
}
|
}
|
||||||
/* Configuration.*/
|
/* Configures the peripheral.*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,6 +105,16 @@ void spi_lld_start(SPIDriver *spip) {
|
||||||
*/
|
*/
|
||||||
void spi_lld_stop(SPIDriver *spip) {
|
void spi_lld_stop(SPIDriver *spip) {
|
||||||
|
|
||||||
|
if (spip->state == SPI_READY) {
|
||||||
|
/* Resets the peripheral.*/
|
||||||
|
|
||||||
|
/* Disables the peripheral.*/
|
||||||
|
#if PLATFORM_SPI_USE_SPI1
|
||||||
|
if (&SPID1 == spip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_SPI_USE_SPI1 */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,6 +126,8 @@ void spi_lld_stop(SPIDriver *spip) {
|
||||||
*/
|
*/
|
||||||
void spi_lld_select(SPIDriver *spip) {
|
void spi_lld_select(SPIDriver *spip) {
|
||||||
|
|
||||||
|
(void)spip;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -111,6 +140,8 @@ void spi_lld_select(SPIDriver *spip) {
|
||||||
*/
|
*/
|
||||||
void spi_lld_unselect(SPIDriver *spip) {
|
void spi_lld_unselect(SPIDriver *spip) {
|
||||||
|
|
||||||
|
(void)spip;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -126,6 +157,9 @@ void spi_lld_unselect(SPIDriver *spip) {
|
||||||
*/
|
*/
|
||||||
void spi_lld_ignore(SPIDriver *spip, size_t n) {
|
void spi_lld_ignore(SPIDriver *spip, size_t n) {
|
||||||
|
|
||||||
|
(void)spip;
|
||||||
|
(void)n;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -146,6 +180,11 @@ void spi_lld_ignore(SPIDriver *spip, size_t n) {
|
||||||
void spi_lld_exchange(SPIDriver *spip, size_t n,
|
void spi_lld_exchange(SPIDriver *spip, size_t n,
|
||||||
const void *txbuf, void *rxbuf) {
|
const void *txbuf, void *rxbuf) {
|
||||||
|
|
||||||
|
(void)spip;
|
||||||
|
(void)n;
|
||||||
|
(void)txbuf;
|
||||||
|
(void)rxbuf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -163,6 +202,10 @@ void spi_lld_exchange(SPIDriver *spip, size_t n,
|
||||||
*/
|
*/
|
||||||
void spi_lld_send(SPIDriver *spip, size_t n, const void *txbuf) {
|
void spi_lld_send(SPIDriver *spip, size_t n, const void *txbuf) {
|
||||||
|
|
||||||
|
(void)spip;
|
||||||
|
(void)n;
|
||||||
|
(void)txbuf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -180,6 +223,10 @@ void spi_lld_send(SPIDriver *spip, size_t n, const void *txbuf) {
|
||||||
*/
|
*/
|
||||||
void spi_lld_receive(SPIDriver *spip, size_t n, void *rxbuf) {
|
void spi_lld_receive(SPIDriver *spip, size_t n, void *rxbuf) {
|
||||||
|
|
||||||
|
(void)spip;
|
||||||
|
(void)n;
|
||||||
|
(void)rxbuf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -196,6 +243,10 @@ void spi_lld_receive(SPIDriver *spip, size_t n, void *rxbuf) {
|
||||||
*/
|
*/
|
||||||
uint16_t spi_lld_polled_exchange(SPIDriver *spip, uint16_t frame) {
|
uint16_t spi_lld_polled_exchange(SPIDriver *spip, uint16_t frame) {
|
||||||
|
|
||||||
|
(void)spip;
|
||||||
|
(void)frame;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAL_USE_SPI */
|
#endif /* HAL_USE_SPI */
|
||||||
|
|
|
@ -39,6 +39,19 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief SPI driver enable switch.
|
||||||
|
* @details If set to @p TRUE the support for SPI1 is included.
|
||||||
|
*/
|
||||||
|
#if !defined(PLATFORM_SPI_USE_SPI1) || defined(__DOXYGEN__)
|
||||||
|
#define PLATFORM_SPI_USE_SPI1 FALSE
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -117,6 +130,10 @@ struct SPIDriver {
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#if PLATFORM_SPI_USE_SPI1 && !defined(__DOXYGEN__)
|
||||||
|
extern SPIDriver SPID1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -39,6 +39,13 @@
|
||||||
/* Driver exported variables. */
|
/* Driver exported variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief UART1 driver identifier.
|
||||||
|
*/
|
||||||
|
#if PLATFORM_UART_USE_UART1 || defined(__DOXYGEN__)
|
||||||
|
UARTDriver UARTD1;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Driver local variables. */
|
/* Driver local variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -62,6 +69,10 @@
|
||||||
*/
|
*/
|
||||||
void uart_lld_init(void) {
|
void uart_lld_init(void) {
|
||||||
|
|
||||||
|
#if PLATFORM_UART_USE_UART1
|
||||||
|
/* Driver initialization.*/
|
||||||
|
uartObjectInit(&UARTD1);
|
||||||
|
#endif /* PLATFORM_UART_USE_UART1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -73,10 +84,16 @@ void uart_lld_init(void) {
|
||||||
*/
|
*/
|
||||||
void uart_lld_start(UARTDriver *uartp) {
|
void uart_lld_start(UARTDriver *uartp) {
|
||||||
|
|
||||||
if (uartp->uart_state == UART_STOP) {
|
if (uartp->state == UART_STOP) {
|
||||||
/* Clock activation.*/
|
/* Enables the pehipheral.*/
|
||||||
|
#if PLATFORM_UART_USE_UART1
|
||||||
|
if (&UARTD1 == uartp) {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_UART_USE_UART1 */
|
||||||
}
|
}
|
||||||
/* Configuration.*/
|
/* Configures the peripheral.*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,6 +105,16 @@ void uart_lld_start(UARTDriver *uartp) {
|
||||||
*/
|
*/
|
||||||
void uart_lld_stop(UARTDriver *uartp) {
|
void uart_lld_stop(UARTDriver *uartp) {
|
||||||
|
|
||||||
|
if (uartp->state == UART_READY) {
|
||||||
|
/* Resets the peripheral.*/
|
||||||
|
|
||||||
|
/* Disables the peripheral.*/
|
||||||
|
#if PLATFORM_UART_USE_UART1
|
||||||
|
if (&UARTD1 == uartp) {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_UART_USE_UART1 */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,6 +130,10 @@ void uart_lld_stop(UARTDriver *uartp) {
|
||||||
*/
|
*/
|
||||||
void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf) {
|
void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf) {
|
||||||
|
|
||||||
|
(void)uartp;
|
||||||
|
(void)n;
|
||||||
|
(void)txbuf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,6 +149,9 @@ void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf) {
|
||||||
*/
|
*/
|
||||||
size_t uart_lld_stop_send(UARTDriver *uartp) {
|
size_t uart_lld_stop_send(UARTDriver *uartp) {
|
||||||
|
|
||||||
|
(void)uartp;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -133,6 +167,10 @@ size_t uart_lld_stop_send(UARTDriver *uartp) {
|
||||||
*/
|
*/
|
||||||
void uart_lld_start_receive(UARTDriver *uartp, size_t n, void *rxbuf) {
|
void uart_lld_start_receive(UARTDriver *uartp, size_t n, void *rxbuf) {
|
||||||
|
|
||||||
|
(void)uartp;
|
||||||
|
(void)n;
|
||||||
|
(void)rxbuf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -148,6 +186,9 @@ void uart_lld_start_receive(UARTDriver *uartp, size_t n, void *rxbuf) {
|
||||||
*/
|
*/
|
||||||
size_t uart_lld_stop_receive(UARTDriver *uartp) {
|
size_t uart_lld_stop_receive(UARTDriver *uartp) {
|
||||||
|
|
||||||
|
(void)uartp;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAL_USE_UART */
|
#endif /* HAL_USE_UART */
|
||||||
|
|
|
@ -39,6 +39,19 @@
|
||||||
/* Driver pre-compile time settings. */
|
/* Driver pre-compile time settings. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Configuration options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief UART driver enable switch.
|
||||||
|
* @details If set to @p TRUE the support for UART1 is included.
|
||||||
|
*/
|
||||||
|
#if !defined(PLATFORM_UART_USE_UART1) || defined(__DOXYGEN__)
|
||||||
|
#define PLATFORM_UART_USE_UART1 FALSE
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -147,6 +160,10 @@ struct UARTDriver {
|
||||||
/* External declarations. */
|
/* External declarations. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#if PLATFORM_UART_USE_UART1 && !defined(__DOXYGEN__)
|
||||||
|
extern UARTDriver UARTD1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -39,7 +39,9 @@
|
||||||
/* Driver exported variables. */
|
/* Driver exported variables. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/** @brief OTG_FS driver identifier.*/
|
/**
|
||||||
|
* @brief USB1 driver identifier.
|
||||||
|
*/
|
||||||
#if PLATFORM_USB_USE_USB1 || defined(__DOXYGEN__)
|
#if PLATFORM_USB_USE_USB1 || defined(__DOXYGEN__)
|
||||||
USBDriver USBD1;
|
USBDriver USBD1;
|
||||||
#endif
|
#endif
|
||||||
|
@ -64,11 +66,6 @@ static union {
|
||||||
USBOutEndpointState out;
|
USBOutEndpointState out;
|
||||||
} ep0_state;
|
} ep0_state;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Buffer for the EP0 setup packets.
|
|
||||||
*/
|
|
||||||
static uint8_t ep0setup_buffer[8];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief EP0 initialization structure.
|
* @brief EP0 initialization structure.
|
||||||
*/
|
*/
|
||||||
|
@ -80,9 +77,7 @@ static const USBEndpointConfig ep0config = {
|
||||||
0x40,
|
0x40,
|
||||||
0x40,
|
0x40,
|
||||||
&ep0_state.in,
|
&ep0_state.in,
|
||||||
&ep0_state.out,
|
&ep0_state.out
|
||||||
1,
|
|
||||||
ep0setup_buffer
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
@ -108,10 +103,10 @@ static const USBEndpointConfig ep0config = {
|
||||||
*/
|
*/
|
||||||
void usb_lld_init(void) {
|
void usb_lld_init(void) {
|
||||||
|
|
||||||
/* Driver initialization.*/
|
|
||||||
#if PLATFORM_USB_USE_USB1
|
#if PLATFORM_USB_USE_USB1
|
||||||
|
/* Driver initialization.*/
|
||||||
usbObjectInit(&USBD1);
|
usbObjectInit(&USBD1);
|
||||||
#endif
|
#endif /* PLATFORM_USB_USE_USB1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -122,16 +117,17 @@ void usb_lld_init(void) {
|
||||||
* @notapi
|
* @notapi
|
||||||
*/
|
*/
|
||||||
void usb_lld_start(USBDriver *usbp) {
|
void usb_lld_start(USBDriver *usbp) {
|
||||||
stm32_otg_t *otgp = usbp->otg;
|
|
||||||
|
|
||||||
if (usbp->state == USB_STOP) {
|
if (usbp->state == USB_STOP) {
|
||||||
/* Clock activation.*/
|
/* Enables the pehipheral.*/
|
||||||
#if STM32_USB_USE_OTG1
|
#if PLATFORM_USB_USE_USB1
|
||||||
if (&USBD1 == usbp) {
|
if (&USBD1 == usbp) {
|
||||||
|
|
||||||
/* Reset procedure enforced on driver start.*/
|
}
|
||||||
_usb_reset(usbp);
|
#endif /* PLATFORM_USB_USE_USB1 */
|
||||||
}
|
}
|
||||||
|
/* Configures the peripheral.*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -143,9 +139,15 @@ void usb_lld_start(USBDriver *usbp) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_stop(USBDriver *usbp) {
|
void usb_lld_stop(USBDriver *usbp) {
|
||||||
|
|
||||||
/* If in ready state then disables the USB clock.*/
|
if (usbp->state == USB_READY) {
|
||||||
if (usbp->state != USB_STOP) {
|
/* Resets the peripheral.*/
|
||||||
|
|
||||||
|
/* Disables the peripheral.*/
|
||||||
|
#if PLATFORM_USB_USE_USB1
|
||||||
|
if (&USBD1 == usbp) {
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif /* PLATFORM_USB_USE_USB1 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,6 +176,8 @@ void usb_lld_reset(USBDriver *usbp) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_set_address(USBDriver *usbp) {
|
void usb_lld_set_address(USBDriver *usbp) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -186,6 +190,9 @@ void usb_lld_set_address(USBDriver *usbp) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_init_endpoint(USBDriver *usbp, usbep_t ep) {
|
void usb_lld_init_endpoint(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -197,6 +204,8 @@ void usb_lld_init_endpoint(USBDriver *usbp, usbep_t ep) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_disable_endpoints(USBDriver *usbp) {
|
void usb_lld_disable_endpoints(USBDriver *usbp) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -213,6 +222,10 @@ void usb_lld_disable_endpoints(USBDriver *usbp) {
|
||||||
*/
|
*/
|
||||||
usbepstatus_t usb_lld_get_status_out(USBDriver *usbp, usbep_t ep) {
|
usbepstatus_t usb_lld_get_status_out(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
|
||||||
|
return EP_STATUS_DISABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -229,6 +242,10 @@ usbepstatus_t usb_lld_get_status_out(USBDriver *usbp, usbep_t ep) {
|
||||||
*/
|
*/
|
||||||
usbepstatus_t usb_lld_get_status_in(USBDriver *usbp, usbep_t ep) {
|
usbepstatus_t usb_lld_get_status_in(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
|
||||||
|
return EP_STATUS_DISABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -247,6 +264,10 @@ usbepstatus_t usb_lld_get_status_in(USBDriver *usbp, usbep_t ep) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_read_setup(USBDriver *usbp, usbep_t ep, uint8_t *buf) {
|
void usb_lld_read_setup(USBDriver *usbp, usbep_t ep, uint8_t *buf) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
(void)buf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -258,14 +279,9 @@ void usb_lld_read_setup(USBDriver *usbp, usbep_t ep, uint8_t *buf) {
|
||||||
* @notapi
|
* @notapi
|
||||||
*/
|
*/
|
||||||
void usb_lld_prepare_receive(USBDriver *usbp, usbep_t ep) {
|
void usb_lld_prepare_receive(USBDriver *usbp, usbep_t ep) {
|
||||||
uint32_t pcnt;
|
|
||||||
USBOutEndpointState *osp = usbp->epc[ep]->out_state;
|
|
||||||
|
|
||||||
/* Transfer initialization.*/
|
(void)usbp;
|
||||||
pcnt = (osp->rxsize + usbp->epc[ep]->out_maxsize - 1) /
|
(void)ep;
|
||||||
usbp->epc[ep]->out_maxsize;
|
|
||||||
usbp->otg->oe[ep].DOEPTSIZ = DOEPTSIZ_STUPCNT(3) | DOEPTSIZ_PKTCNT(pcnt) |
|
|
||||||
DOEPTSIZ_XFRSIZ(usbp->epc[ep]->out_maxsize);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +294,9 @@ void usb_lld_prepare_receive(USBDriver *usbp, usbep_t ep) {
|
||||||
* @notapi
|
* @notapi
|
||||||
*/
|
*/
|
||||||
void usb_lld_prepare_transmit(USBDriver *usbp, usbep_t ep) {
|
void usb_lld_prepare_transmit(USBDriver *usbp, usbep_t ep) {
|
||||||
USBInEndpointState *isp = usbp->epc[ep]->in_state;
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,6 +310,9 @@ void usb_lld_prepare_transmit(USBDriver *usbp, usbep_t ep) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_start_out(USBDriver *usbp, usbep_t ep) {
|
void usb_lld_start_out(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -304,6 +325,9 @@ void usb_lld_start_out(USBDriver *usbp, usbep_t ep) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_start_in(USBDriver *usbp, usbep_t ep) {
|
void usb_lld_start_in(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -316,6 +340,9 @@ void usb_lld_start_in(USBDriver *usbp, usbep_t ep) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_stall_out(USBDriver *usbp, usbep_t ep) {
|
void usb_lld_stall_out(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -328,6 +355,9 @@ void usb_lld_stall_out(USBDriver *usbp, usbep_t ep) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_stall_in(USBDriver *usbp, usbep_t ep) {
|
void usb_lld_stall_in(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -340,6 +370,9 @@ void usb_lld_stall_in(USBDriver *usbp, usbep_t ep) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_clear_out(USBDriver *usbp, usbep_t ep) {
|
void usb_lld_clear_out(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -352,6 +385,9 @@ void usb_lld_clear_out(USBDriver *usbp, usbep_t ep) {
|
||||||
*/
|
*/
|
||||||
void usb_lld_clear_in(USBDriver *usbp, usbep_t ep) {
|
void usb_lld_clear_in(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
|
(void)usbp;
|
||||||
|
(void)ep;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAL_USE_USB */
|
#endif /* HAL_USE_USB */
|
||||||
|
|
|
@ -50,13 +50,17 @@
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief OTG1 driver enable switch.
|
* @name Configuration options
|
||||||
* @details If set to @p TRUE the support for OTG_FS is included.
|
* @{
|
||||||
* @note The default is @p TRUE.
|
*/
|
||||||
|
/**
|
||||||
|
* @brief USB driver enable switch.
|
||||||
|
* @details If set to @p TRUE the support for USB1 is included.
|
||||||
*/
|
*/
|
||||||
#if !defined(PLATFORM_USB_USE_USB1) || defined(__DOXYGEN__)
|
#if !defined(PLATFORM_USB_USE_USB1) || defined(__DOXYGEN__)
|
||||||
#define PLATFORM_USB_USE_USB1 TRUE
|
#define PLATFORM_USB_USE_USB1 FALSE
|
||||||
#endif
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Derived constants and error checks. */
|
/* Derived constants and error checks. */
|
||||||
|
|
|
@ -119,6 +119,7 @@
|
||||||
(backported to 2.4.3).
|
(backported to 2.4.3).
|
||||||
- FIX: Fixed wrong SPI path in platform_f105_f107.mk (bug 3598151).
|
- FIX: Fixed wrong SPI path in platform_f105_f107.mk (bug 3598151).
|
||||||
- FIX: Fixed PHY powerdown issues not fixed (bug 3596911).
|
- FIX: Fixed PHY powerdown issues not fixed (bug 3596911).
|
||||||
|
- NEW: Added a build test project for low level device driver templates.
|
||||||
- NEW: Enhanced CAN driver model, support for mailboxes has been added. STM32
|
- NEW: Enhanced CAN driver model, support for mailboxes has been added. STM32
|
||||||
driver implementation upgraded.
|
driver implementation upgraded.
|
||||||
- NEW: Added ADC and PWM drivers for the AT91SAM7 platform, both donated
|
- NEW: Added ADC and PWM drivers for the AT91SAM7 platform, both donated
|
||||||
|
|
|
@ -24,11 +24,6 @@
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
<linkedResources>
|
<linkedResources>
|
||||||
<link>
|
|
||||||
<name>board</name>
|
|
||||||
<type>2</type>
|
|
||||||
<locationURI>CHIBIOS/boards/ST_STM32F4_DISCOVERY</locationURI>
|
|
||||||
</link>
|
|
||||||
<link>
|
<link>
|
||||||
<name>os</name>
|
<name>os</name>
|
||||||
<type>2</type>
|
<type>2</type>
|
||||||
|
|
|
@ -65,7 +65,7 @@ PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
#include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/templates/platform.mk
|
include $(CHIBIOS)/os/hal/templates/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
/*
|
||||||
|
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
|
||||||
|
2011,2012 Giovanni Di Sirio.
|
||||||
|
|
||||||
|
This file is part of ChibiOS/RT.
|
||||||
|
|
||||||
|
ChibiOS/RT is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ChibiOS/RT is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _BOARD_H_
|
||||||
|
#define _BOARD_H_
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Setup for a generic board.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board identifier.
|
||||||
|
*/
|
||||||
|
#define BOARD_GENERIC
|
||||||
|
#define BOARD_NAME "Generic Board"
|
||||||
|
|
||||||
|
#if !defined(_FROM_ASM_)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
void boardInit(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* _FROM_ASM_ */
|
||||||
|
|
||||||
|
#endif /* _BOARD_H_ */
|
Loading…
Reference in New Issue