kinetis: Move RTT config to periph_cpu.h
This commit is contained in:
parent
c7801e466d
commit
a6c30ab61d
@ -265,21 +265,6 @@ static const spi_conf_t spi_config[] = {
|
|||||||
#define I2C_0_PORT_CFG (PORT_PCR_MUX(I2C_0_PIN_AF) | PORT_PCR_ODE_MASK)
|
#define I2C_0_PORT_CFG (PORT_PCR_MUX(I2C_0_PIN_AF) | PORT_PCR_ODE_MASK)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name RTT and RTC configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define RTT_NUMOF (1U)
|
|
||||||
#define RTC_NUMOF (1U)
|
|
||||||
#define RTT_DEV RTC
|
|
||||||
#define RTT_IRQ RTC_IRQn
|
|
||||||
#define RTT_IRQ_PRIO 10
|
|
||||||
#define RTT_UNLOCK() (SIM->SCGC6 |= (SIM_SCGC6_RTC_MASK))
|
|
||||||
#define RTT_ISR isr_rtc
|
|
||||||
#define RTT_FREQUENCY (1)
|
|
||||||
#define RTT_MAX_VALUE (0xffffffff)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -259,21 +259,6 @@ static const spi_conf_t spi_config[] = {
|
|||||||
#define I2C_0_PORT_CFG (PORT_PCR_MUX(I2C_0_PIN_AF) | PORT_PCR_ODE_MASK)
|
#define I2C_0_PORT_CFG (PORT_PCR_MUX(I2C_0_PIN_AF) | PORT_PCR_ODE_MASK)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name RTT and RTC configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define RTT_NUMOF (1U)
|
|
||||||
#define RTC_NUMOF (1U)
|
|
||||||
#define RTT_DEV RTC
|
|
||||||
#define RTT_IRQ RTC_IRQn
|
|
||||||
#define RTT_IRQ_PRIO 10
|
|
||||||
#define RTT_UNLOCK() (SIM->SCGC6 |= (SIM_SCGC6_RTC_MASK))
|
|
||||||
#define RTT_ISR isr_rtc
|
|
||||||
#define RTT_FREQUENCY (1)
|
|
||||||
#define RTT_MAX_VALUE (0xffffffff)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -286,21 +286,6 @@ static const spi_conf_t spi_config[] = {
|
|||||||
#define I2C_1_PORT_CFG (PORT_PCR_MUX(I2C_0_PIN_AF))
|
#define I2C_1_PORT_CFG (PORT_PCR_MUX(I2C_0_PIN_AF))
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name RTT and RTC configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define RTT_NUMOF (1U)
|
|
||||||
#define RTC_NUMOF (1U)
|
|
||||||
#define RTT_DEV RTC
|
|
||||||
#define RTT_IRQ RTC_IRQn
|
|
||||||
#define RTT_IRQ_PRIO 10
|
|
||||||
#define RTT_UNLOCK() (bit_set32(&SIM->SCGC6, SIM_SCGC6_RTC_SHIFT))
|
|
||||||
#define RTT_ISR isr_rtc
|
|
||||||
#define RTT_FREQUENCY (1)
|
|
||||||
#define RTT_MAX_VALUE (0xffffffff)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Random Number Generator configuration
|
* @name Random Number Generator configuration
|
||||||
* @{
|
* @{
|
||||||
|
|||||||
@ -115,6 +115,7 @@ static const clock_config_t clock_config = {
|
|||||||
#define PIT_ISR_0 isr_pit1
|
#define PIT_ISR_0 isr_pit1
|
||||||
#define PIT_ISR_1 isr_pit3
|
#define PIT_ISR_1 isr_pit3
|
||||||
#define LPTMR_ISR_0 isr_lptmr0
|
#define LPTMR_ISR_0 isr_lptmr0
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -374,28 +375,6 @@ static const spi_conf_t spi_config[] = {
|
|||||||
#define KINETIS_I2C_F_MULT_FAST_PLUS (0)
|
#define KINETIS_I2C_F_MULT_FAST_PLUS (0)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name RTC configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/* RIOT RTC implementation uses RTT for underlying timekeeper */
|
|
||||||
#define RTC_NUMOF (1U)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @name RTT configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define RTT_NUMOF (1U)
|
|
||||||
#define RTT_IRQ RTC_IRQn
|
|
||||||
#define RTT_IRQ_PRIO 10
|
|
||||||
#define RTT_ISR isr_rtc
|
|
||||||
#define RTT_DEV RTC
|
|
||||||
#define RTT_UNLOCK() (BITBAND_REG32(SIM->SCGC6, SIM_SCGC6_RTC_SHIFT) = 1)
|
|
||||||
#define RTT_MAX_VALUE (0xffffffff)
|
|
||||||
#define RTT_FREQUENCY (1) /* in Hz */
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -289,21 +289,6 @@ static const spi_conf_t spi_config[] = {
|
|||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
|
||||||
* @name RTT and RTC configuration
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
#define RTT_NUMOF (1U)
|
|
||||||
#define RTC_NUMOF (1U)
|
|
||||||
#define RTT_DEV RTC
|
|
||||||
#define RTT_IRQ RTC_IRQn
|
|
||||||
#define RTT_IRQ_PRIO 10
|
|
||||||
#define RTT_UNLOCK() (SIM->SCGC6 |= (SIM_SCGC6_RTC_MASK))
|
|
||||||
#define RTT_ISR isr_rtc
|
|
||||||
#define RTT_FREQUENCY (1)
|
|
||||||
#define RTT_MAX_VALUE (0xffffffff)
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -114,6 +114,20 @@ typedef uint16_t gpio_t;
|
|||||||
*/
|
*/
|
||||||
#define PM_NUM_MODES (1U)
|
#define PM_NUM_MODES (1U)
|
||||||
|
|
||||||
|
#ifdef RTC
|
||||||
|
/* All Kinetis CPUs have exactly one RTC hardware module, except for the KL02
|
||||||
|
* family which don't have an RTC at all */
|
||||||
|
/**
|
||||||
|
* @name RTT and RTC configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define RTT_NUMOF (1U)
|
||||||
|
#define RTC_NUMOF (1U)
|
||||||
|
#define RTT_FREQUENCY (1)
|
||||||
|
#define RTT_MAX_VALUE (0xffffffff)
|
||||||
|
/** @} */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef DOXYGEN
|
#ifndef DOXYGEN
|
||||||
/**
|
/**
|
||||||
* @name GPIO pin modes
|
* @name GPIO pin modes
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user