CPU specific definitions for internal peripheral handling. More...
CPU specific definitions for internal peripheral handling.
Definition in file periph_cpu.h.
#include <stdint.h>
#include "cpu.h"
Go to the source code of this file.
Data Structures | |
struct | FIO_PORT_t |
Fast GPIO register definition struct. More... | |
struct | uart_conf_t |
UART device configuration. More... | |
struct | spi_conf_t |
SPI device configuration. More... | |
struct | adc_conf_t |
ADC device configuration. More... | |
struct | i2c_conf_t |
I2C configuration structure. More... | |
Macros | |
#define | FIO_PORTS ((FIO_PORT_t*)FIO_BASE_ADDR) |
Pointer to the Fast GPIO register. | |
#define | PINSEL ((__IO uint32_t *)(PINSEL_BASE_ADDR)) |
Pointer to the PINSEL register. | |
#define | PINMODE ((__IO uint32_t *)(PINSEL_BASE_ADDR + 0x40)) |
Pointer to the PINMODE register. | |
#define | GPIO_PIN(port, pin) |
Macro for accessing GPIO pins. | |
#define | TIMER_CHANNEL_NUMOF (4U) |
Number of available timer channels. | |
#define | PERIPH_TIMER_PROVIDES_SET |
Prevent shared timer functions from being used. | |
#define | DAC_NUMOF (1U) |
DAC configuration, valid for all boards using this CPU. | |
Functions | |
int | gpio_init_mux (unsigned pin, unsigned mux) |
Set up alternate function (PMUX setting) for a PORT pin. | |
#define | __IO volatile |
LPC2387 MCU defines. | |
Power mode configuration | |
#define | PM_NUM_MODES (4) |
#define | PERIPH_SPI_NEEDS_INIT_CS |
Declare needed generic SPI functions. | |
#define | PERIPH_SPI_NEEDS_TRANSFER_BYTE |
#define | PERIPH_SPI_NEEDS_TRANSFER_REG |
#define | PERIPH_SPI_NEEDS_TRANSFER_REGS |
#define __IO volatile |
LPC2387 MCU defines.
Definition at line 29 of file periph_cpu.h.
#define DAC_NUMOF (1U) |
DAC configuration, valid for all boards using this CPU.
lpc23xx has a fixed mapping of DAC pins and a fixed number of DAC channels, so this DAC configuration is valid for all boards using this CPU. No need for any board specific configuration.
The DAC of the lpc23xx is mapped to the following fixed pin:
Definition at line 169 of file periph_cpu.h.
#define FIO_PORTS ((FIO_PORT_t*)FIO_BASE_ADDR) |
Pointer to the Fast GPIO register.
Definition at line 64 of file periph_cpu.h.
#define GPIO_PIN | ( | port, | |
pin ) |
#define PERIPH_I2C_NEED_READ_REG |
Definition at line 233 of file periph_cpu.h.
#define PERIPH_I2C_NEED_WRITE_REG |
Definition at line 234 of file periph_cpu.h.
#define PERIPH_SPI_NEEDS_INIT_CS |
Declare needed generic SPI functions.
Definition at line 137 of file periph_cpu.h.
#define PERIPH_SPI_NEEDS_TRANSFER_BYTE |
Definition at line 138 of file periph_cpu.h.
#define PERIPH_SPI_NEEDS_TRANSFER_REG |
Definition at line 139 of file periph_cpu.h.
#define PERIPH_SPI_NEEDS_TRANSFER_REGS |
Definition at line 140 of file periph_cpu.h.
#define PERIPH_TIMER_PROVIDES_SET |
Prevent shared timer functions from being used.
Definition at line 131 of file periph_cpu.h.
#define PINMODE ((__IO uint32_t *)(PINSEL_BASE_ADDR + 0x40)) |
Pointer to the PINMODE register.
Definition at line 74 of file periph_cpu.h.
#define PINSEL ((__IO uint32_t *)(PINSEL_BASE_ADDR)) |
Pointer to the PINSEL register.
Definition at line 69 of file periph_cpu.h.
#define PM_NUM_MODES (4) |
Definition at line 36 of file periph_cpu.h.
#define TIMER_CHANNEL_NUMOF (4U) |
Number of available timer channels.
Definition at line 126 of file periph_cpu.h.
int gpio_init_mux | ( | unsigned | pin, |
unsigned | mux ) |
Set up alternate function (PMUX setting) for a PORT pin.
[in] | pin | Pin to set the multiplexing for |
[in] | mux | Mux value |