misc: aggregated doxygen fixes

pr/spi.typo
Hauke Petersen 6 years ago
parent 1544699286
commit 5bdb3bfa61

@ -293,16 +293,6 @@ static const spi_conf_t spi_config[] = {
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
/** @} */
/**
* @name I2C configuration
* @{
*/
#define I2C_NUMOF (1U)
#define I2C_CLK SystemBusClock
#define I2C_0_EN 1
#define I2C_1_EN 0
#define I2C_IRQ_PRIO CPU_DEFAULT_IRQ_PRIO
/**
* @name I2C baud rate configuration
* @{
@ -321,6 +311,16 @@ static const spi_conf_t spi_config[] = {
#define KINETIS_I2C_F_MULT_FAST_PLUS (0)
/** @} */
/**
* @name I2C configuration
* @{
*/
#define I2C_NUMOF (1U)
#define I2C_CLK SystemBusClock
#define I2C_0_EN 1
#define I2C_1_EN 0
#define I2C_IRQ_PRIO CPU_DEFAULT_IRQ_PRIO
/* I2C 0 device configuration */
#define I2C_0_DEV I2C0
#define I2C_0_CLKEN() (BITBAND_REG32(SIM->SCGC4, SIM_SCGC4_I2C0_SHIFT) = 1)
@ -336,7 +336,6 @@ static const spi_conf_t spi_config[] = {
#define I2C_0_PORT_CFG (PORT_PCR_MUX(I2C_0_PIN_AF) | PORT_PCR_ODE_MASK)
/** @} */
/**
* @name GPIO configuration
* @{

@ -48,6 +48,9 @@ typedef uint32_t gpio_t;
*/
#define GPIO_PIN(port, pin) (gpio_t)(((uint32_t)GPIO_A + (port << 12)) | pin)
/**
* @brief Define a custom GPIO_UNDEF value
*/
#define GPIO_UNDEF 99
/**

@ -245,11 +245,11 @@ typedef struct {
*/
typedef struct {
FTM_Type* ftm; /**< used FTM */
struct { /**< logical channel configuration */
struct {
gpio_t pin; /**< GPIO pin used, set to GPIO_UNDEF */
uint8_t af; /**< alternate function mapping */
uint8_t ftm_chan; /**< the actual FTM channel used */
} chan[PWM_CHAN_MAX];
} chan[PWM_CHAN_MAX]; /**< logical channel configuration */
uint8_t chan_numof; /**< number of actually configured channels */
uint8_t ftm_num; /**< FTM number used */
} pwm_conf_t;
@ -277,9 +277,11 @@ enum {
/**
* @brief Hardware timer type-specific device macros
* @{
*/
#define TIMER_PIT_DEV(x) (TIMER_DEV(0 + (x)))
#define TIMER_LPTMR_DEV(x) (TIMER_DEV(PIT_NUMOF + (x)))
/** @} */
/**
* @brief CPU internal function for initializing PORTs

@ -109,10 +109,10 @@ typedef enum {
* @brief PWM configuration
*/
typedef struct {
LPC_CTxxBx_Type *dev;
__IO uint32_t *pins[PWM_CHAN_NUMOF]; /**< set to NULL if channel is not used */
uint16_t clk_bit;
uint8_t af;
LPC_CTxxBx_Type *dev; /**< PWM device */
__IO uint32_t *pins[PWM_CHAN_NUMOF]; /**< set to NULL if channel is not used */
uint16_t clk_bit; /**< clock enable bit */
uint8_t af; /**< alternate pin function */
} pwm_conf_t;
/**
@ -120,16 +120,18 @@ typedef struct {
*
* @note The values expect the CPU to run at 12MHz
* @todo Generalize the SPI driver
*
* @{
*/
#define HAVE_SPI_CLK_T
typedef enum {
SPI_CLK_100KHZ = 119, /**< drive the SPI bus with 100KHz */
SPI_CLK_400KHZ = 29, /**< drive the SPI bus with 400KHz */
SPI_CLK_1MHZ = 11, /**< drive the SPI bus with 1MHz */
SPI_CLK_5MHZ = 2, /**< drive the SPI bus with 5MHz */
SPI_CLK_100KHZ = 119, /**< drive the SPI bus with 100KHz */
SPI_CLK_400KHZ = 29, /**< drive the SPI bus with 400KHz */
SPI_CLK_1MHZ = 11, /**< drive the SPI bus with 1MHz */
SPI_CLK_5MHZ = 2, /**< drive the SPI bus with 5MHz */
SPI_CLK_10MHZ = 0 /**< actual: 12 MHz */
} spi_clk_t;
/** @} */
/**
* @brief SPI configuration data

@ -82,6 +82,7 @@ typedef enum {
/**
* @brief Override SPI clock speed values
* @{
*/
#define HAVE_SPI_CLK_T
typedef enum {
@ -91,6 +92,7 @@ typedef enum {
SPI_CLK_5MHZ = 5000, /**< drive the SPI bus with 5MHz */
SPI_CLK_10MHZ = 10000 /**< drive the SPI bus with 10MHz */
} spi_clk_t;
/** @} */
/* @} */
#ifdef __cplusplus

@ -123,6 +123,7 @@ typedef struct {
/**
* @brief Override SPI mode values
* @{
*/
#define HAVE_SPI_MODE_T
typedef enum {
@ -131,9 +132,11 @@ typedef enum {
SPI_MODE_2 = SPI_CONFIG_CPOL_Msk, /**< CPOL=1, CPHA=0 */
SPI_MODE_3 = (SPI_CONFIG_CPOL_Msk | SPI_CONFIG_CPHA_Msk) /**< CPOL=1, CPHA=1 */
} spi_mode_t;
/** @} */
/**
* @brief Override SPI clock values
* @{
*/
#define HAVE_SPI_CLK_T
typedef enum {
@ -143,6 +146,7 @@ typedef enum {
SPI_CLK_5MHZ = SPI_FREQUENCY_FREQUENCY_M4, /**< 5MHz */
SPI_CLK_10MHZ = SPI_FREQUENCY_FREQUENCY_M8 /**< 10MHz */
} spi_clk_t;
/** @} */
/**
* @brief SPI configuration values

@ -127,6 +127,10 @@ typedef enum {
GPIO_MUX_B = 1, /**< alternate function B */
} gpio_mux_t;
/**
* @brief Override default SPI modes
* @{
*/
#define HAVE_SPI_MODE_T
typedef enum {
SPI_MODE_0 = (SPI_CSR_NCPHA), /**< CPOL=0, CPHA=0 */
@ -134,7 +138,12 @@ typedef enum {
SPI_MODE_2 = (SPI_CSR_CPOL | SPI_CSR_NCPHA), /**< CPOL=1, CPHA=0 */
SPI_MODE_3 = (SPI_CSR_CPOL) /**< CPOL=1, CPHA=1 */
} spi_mode_t;
/** @} */
/**
* @brief Override default SPI clock values
* @{
*/
#define HAVE_SPI_CLK_T
typedef enum {
SPI_CLK_100KHZ = (100000), /**< 100KHz */
@ -143,6 +152,7 @@ typedef enum {
SPI_CLK_5MHZ = (5000000), /**< 5MHz */
SPI_CLK_10MHZ = (10000000) /**< 10MHz */
} spi_clk_t;
/** @} */
/**
* @brief Timer configuration data

@ -51,6 +51,11 @@ extern "C" {
*/
#define GPIO_MODE(mode, cnf, odr) (mode | (cnf << 2) | (odr << 4))
/**
* @brief Define the number of available PM modes
*/
#define PM_NUM_MODES (2U)
#ifndef DOXYGEN
/**
* @brief Override GPIO mode options
@ -126,8 +131,6 @@ typedef struct {
uint8_t chan; /**< DAC device used for this line */
} dac_conf_t;
#define PM_NUM_MODES (2U)
#ifdef __cplusplus
}
#endif

@ -178,6 +178,11 @@ static inline uint32_t dma_ifc(int stream)
}
}
/**
* @brief Enable DMA interrupts
*
* @param[in] stream logical DMA stream
*/
static inline void dma_isr_enable(int stream)
{
if (stream < 7) {

@ -120,6 +120,7 @@ int adt7310_set_config(adt7310_t *dev, uint8_t config);
*
* @param[in] dev pointer to sensor device descriptor
* @param[in] spi SPI bus the sensor is connected to
* @param[in] clk SPI bus speed
* @param[in] cs GPIO pin the chip select signal is connected to
*
* @return 0 on success

@ -715,6 +715,7 @@ typedef struct __attribute__((packed))
*
* @param[in] dev Device descriptor of sensor to initialize
* @param[in] spi SPI bus the accelerometer is connected to
* @param[in] clk SPI bus speed
* @param[in] cs_pin GPIO connected to the chip select pin of the accelerometer
* @param[in] scale Initial scale setting of the sensor
*

@ -9,7 +9,7 @@ BOARD_BLACKLIST := arduino-mega2560 msb-430h telosb waspmote-pro z1 arduino-uno
arduino-duemilanove
BOARD_INSUFFICIENT_MEMORY := airfy-beacon arduino-mega2560 msb-430h nrf6310 \
nucleo-f334 pca10005 stm32f0discovery telosb \
weio yunjia-nrf51822 z1 nucleo-f030
weio yunjia-nrf51822 z1 nucleo-f030 wsn430-v1_4
# including lwip_ipv6_mld would currently break this test on at86rf2xx radios
USEMODULE += lwip lwip_ipv6_autoconfig lwip_conn_ip lwip_netdev2

Loading…
Cancel
Save