36typedef uint16_t gpio_t;
42#define GPIO_UNDEF (0xffff)
52#define GPIO_PIN(x, y) (((x) << 12u) | (y))
61#define CPUID_ADDR (FSL_FEATURE_FLASH_ADDR_OF_VENDOR_BD_ADDR)
71#define WDT_HAS_STOP (1)
84#define NWDT_TIME_LOWER_LIMIT (1U)
85#define NWDT_TIME_UPPER_LIMIT (268435U)
86#define WWDT_TIME_LOWER_LIMIT (1U)
87#define WWDT_TIME_UPPER_LIMIT (268435U)
99#define GPIO_MODE(open_drain, out_enabled, pull_mode) \
100 ((open_drain) | ((out_enabled) << 1) | ((pull_mode) << 4))
107#define HAVE_GPIO_MODE_T
124#define HAVE_GPIO_FLANK_T
156#define BOARD_HAS_ADC_PA06_CAP
165#define HAVE_ADC_RES_T
209#define QN908X_ADC_CLOCK
267#define ADC_VREF_GAIN_X15 (0x100u)
280#define ADC_PGA_ENABLE (0x08u)
336#define TIMER_CHANNEL_NUMOF (4)
337#define TIMER_MAX_VALUE (0xffffffff)
341#define PERIPH_TIMER_PROVIDES_SET 1
351#define HAVE_I2C_SPEED_T
375#define PERIPH_I2C_NEED_READ_REG
376#define PERIPH_I2C_NEED_READ_REGS
377#define PERIPH_I2C_NEED_WRITE_REG
378#define PERIPH_I2C_NEED_WRITE_REGS
385#define i2c_pin_sda(dev) i2c_config[dev].pin_sda
386#define i2c_pin_scl(dev) i2c_config[dev].pin_scl
393#define PERIPH_SPI_NEEDS_TRANSFER_BYTE
394#define PERIPH_SPI_NEEDS_TRANSFER_REG
395#define PERIPH_SPI_NEEDS_TRANSFER_REGS
405#define SPI_HWCS(x) (1u << 15u | (x))
410#define SPI_HWCS_NUMOF 4
417#define SPI_MODE_SEL(pol, pha) (SPI_CFG_CPOL(pol) | SPI_CFG_CPHA(pha))
425#define HAVE_SPI_MODE_T
443#define HAVE_SPI_CLK_T
457#define spi_pin_mosi(bus) spi_config[bus].copi_pin
458#define spi_pin_miso(bus) spi_config[bus].cipo_pin
459#define spi_pin_clk(bus) spi_config[bus].clk_pin
493#define UART_INVALID_MODE (0x80)
509#define HAVE_UART_PARITY_T
525#define HAVE_UART_DATA_BITS_T
538#define HAVE_UART_STOP_BITS_T
@ GPIO_OUT
select GPIO MASK as output
@ GPIO_IN
select GPIO MASK as input
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
@ I2C_SPEED_FAST_PLUS
fast plus mode: ~1000 kbit/s
@ I2C_SPEED_LOW
low speed mode: ~10 kbit/s
@ I2C_SPEED_HIGH
high speed mode: ~3400 kbit/s
@ I2C_SPEED_FAST
fast mode: ~400 kbit/s
@ SPI_CLK_10MHZ
drive the SPI bus with 10MHz
@ SPI_CLK_5MHZ
drive the SPI bus with 5MHz
@ SPI_CLK_400KHZ
drive the SPI bus with 400KHz
@ SPI_CLK_1MHZ
drive the SPI bus with 1MHz
@ SPI_CLK_100KHZ
drive the SPI bus with 100KHz
gpio_t adc_conf_t
ADC configuration wrapper.
#define GPIO_MODE(x, y)
Internal macro for combining pin mode (x) and pull-up/down (y).
adc_res_t
Possible ADC resolution settings.
@ ADC_RES_16BIT
ADC resolution: 16 bit.
@ ADC_RES_8BIT
ADC resolution: 8 bit.
@ ADC_RES_14BIT
ADC resolution: 14 bit.
@ ADC_RES_6BIT
ADC resolution: 6 bit.
@ ADC_RES_10BIT
ADC resolution: 10 bit.
@ ADC_RES_12BIT
ADC resolution: 12 bit.
@ GPIO_PORTS_NUMOF
overall number of available ports
#define SPI_HWCS_NUMOF
Kinetis CPUs have a maximum number of 5 hardware chip select lines.
spi_mode_t
Support SPI modes.
@ SPI_MODE_0
CPOL=0, CPHA=0.
@ SPI_MODE_2
CPOL=1, CPHA=0.
@ SPI_MODE_1
CPOL=0, CPHA=1.
@ SPI_MODE_3
CPOL=1, CPHA=1.
gpio_mode_t
Available pin modes.
qn908x_adc_clock_t
ADC oversample clock configuration.
@ ADC_CLOCK_500K
500 KHz from the high speed clock.
@ ADC_CLOCK_1M
1 MHz from the high speed clock.
@ ADC_CLOCK_62K5
62.5 KHz from the high speed clock.
@ ADC_CLOCK_125K
125 KHz from the high speed clock.
@ ADC_CLOCK_2M
2 MHz from the high speed clock.
@ ADC_CLOCK_31K25
31.25 KHz from the high speed clock.
@ ADC_CLOCK_32K
32 KHz or 32.768 KHz from the low speed clock.
@ ADC_CLOCK_4M
4 MHz from the high speed clock.
@ ADC_CLOCK_250K
250 KHz from the high speed clock.
qn908x_adc_vref_t
ADC Vref configuration.
@ ADC_VREF_VEXT
Vref := external ADC_VREFI with the driver.
@ ADC_VREF_VCC
Vref := Vcc.
@ ADC_VREF_1V2
Vref := internal 1.2V.
@ ADC_VREF_VREF
Vref := external ADC_VREFI pin.
uart_parity_t
Definition of possible parity modes.
@ UART_PARITY_SPACE
space parity
@ UART_PARITY_NONE
no parity
@ UART_PARITY_EVEN
even parity
@ UART_PARITY_ODD
odd parity
@ UART_PARITY_MARK
mark parity
uart_stop_bits_t
Definition of possible stop bits lengths.
@ UART_STOP_BITS_2
2 stop bits
@ UART_STOP_BITS_1
1 stop bit
#define UART_INVALID_MODE
Invalid UART mode mask.
qn908x_adc_gain_t
ADC SD Gain configuration.
@ ADC_GAIN_X05
Use gain := 0.5.
@ ADC_GAIN_X1
Use gain := 1.
@ ADC_GAIN_X20
Use gain := 2.
@ ADC_GAIN_X15
Use gain := 1.5.
qn908x_adc_vinn_t
ADC Vinn configuration.
@ ADC_VINN_VREF_2
Use Vinn := 1/2 * Vref.
@ ADC_VINN_VREF
Use Vinn := Vref.
@ ADC_VINN_AVSS
Use Vinn := Vss.
@ ADC_VINN_VREF_3_4
Use Vinn := 3/4 * Vref.
uart_data_bits_t
Definition of possible data bits lengths in a UART frame.
@ UART_DATA_BITS_6
6 data bits
@ UART_DATA_BITS_5
5 data bits
@ UART_DATA_BITS_7
7 data bits
@ UART_DATA_BITS_8
8 data bits
qn908x_adc_channel_t
ADC channel pair configuration.
@ ADC_CHANNEL_ADC4_VINN
Sample ADC4 / Vinn.
@ ADC_CHANNEL_ADC5_VINN
Sample ADC5 / Vinn.
@ ADC_CHANNEL_TEMP
Sample internal temperature.
@ ADC_CHANNEL_ADC0_ADC1
Sample ADC0 / ADC1.
@ ADC_CHANNEL_ADC3_VINN
Sample ADC3 / Vinn.
@ ADC_CHANNEL_ADC1_VINN
Sample ADC1 / Vinn.
@ ADC_CHANNEL_ADC6_VINN
Sample ADC6 / Vinn.
@ ADC_CHANNEL_VINN_VINN
Sample Vinn / Vinn.
@ ADC_CHANNEL_ADC0_VINN
Sample ADC0 / Vinn.
@ ADC_CHANNEL_ADC2_ADC3
Sample ADC2 / ADC3.
@ ADC_CHANNEL_ADC2_VINN
Sample ADC2 / Vinn.
@ ADC_CHANNEL_ADC4_ADC5
Sample ADC4 / ADC5.
@ ADC_CHANNEL_VINN_VSS
Sample Vinn / Vss.
@ ADC_CHANNEL_ADC6_ADC7
Sample ADC6 / ADC7.
@ ADC_CHANNEL_ADC7_VINN
Sample ADC7 / Vinn.
@ ADC_CHANNEL_VCC4_VINN
Sample 1/4 Vcc / Vinn.
I2C configuration structure.
SPI device configuration.
UART device configuration.