Merge pull request #14516 from benpicco/bitband_hw
cortexm_common: fix check for bitbanding feature
This commit is contained in:
commit
234a720571
@ -40,6 +40,7 @@ extern "C" {
|
|||||||
#define CPU_DEFAULT_IRQ_PRIO (1U)
|
#define CPU_DEFAULT_IRQ_PRIO (1U)
|
||||||
#define CPU_IRQ_NUMOF PERIPH_COUNT_IRQn
|
#define CPU_IRQ_NUMOF PERIPH_COUNT_IRQn
|
||||||
#define CPU_FLASH_BASE FLASH_BASE
|
#define CPU_FLASH_BASE FLASH_BASE
|
||||||
|
#define CPU_HAS_BITBAND (1)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@ -27,6 +27,11 @@
|
|||||||
#include "cc26x0_fcfg.h"
|
#include "cc26x0_fcfg.h"
|
||||||
#include "cc26x0_prcm.h"
|
#include "cc26x0_prcm.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Bit-Band configuration
|
||||||
|
*/
|
||||||
|
#define CPU_HAS_BITBAND 1
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -29,6 +29,11 @@
|
|||||||
#include "cc26x2_cc13x2_prcm.h"
|
#include "cc26x2_cc13x2_prcm.h"
|
||||||
#include "cc26x2_cc13x2_setup.h"
|
#include "cc26x2_cc13x2_setup.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Bit-Band configuration
|
||||||
|
*/
|
||||||
|
#define CPU_HAS_BITBAND 1
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -35,16 +35,8 @@ extern "C" {
|
|||||||
#define CPU_HAS_BITBAND 1 || 0 (1 for Cortex-M3 and up, 0 for Cortex-M0)
|
#define CPU_HAS_BITBAND 1 || 0 (1 for Cortex-M3 and up, 0 for Cortex-M0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CPU_HAS_BITBAND
|
|
||||||
#if (__CORTEX_M >= 3)
|
|
||||||
#define CPU_HAS_BITBAND 1
|
|
||||||
#else
|
|
||||||
#define CPU_HAS_BITBAND 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CPU_HAS_BITBAND || DOXYGEN
|
#if CPU_HAS_BITBAND || DOXYGEN
|
||||||
/* Cortex-M3 and higher provide a bitband address space for atomically accessing
|
/* Some MCUs provide a bitband address space for atomically accessing
|
||||||
* single bits of peripheral registers, and sometimes for RAM as well */
|
* single bits of peripheral registers, and sometimes for RAM as well */
|
||||||
/**
|
/**
|
||||||
* @name Bit manipulation functions
|
* @name Bit manipulation functions
|
||||||
|
|||||||
@ -51,6 +51,15 @@ extern "C" {
|
|||||||
#define FLASHPAGE_RAW_ALIGNMENT (4U)
|
#define FLASHPAGE_RAW_ALIGNMENT (4U)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Bit-Band configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#ifdef BITBAND_RAM_BASE
|
||||||
|
#define CPU_HAS_BITBAND 1
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -42,6 +42,15 @@ extern "C" {
|
|||||||
#define CPU_FLASH_BASE FLASH_BASE
|
#define CPU_FLASH_BASE FLASH_BASE
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Bit-Band configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#ifdef BITBAND_RAM_BASE
|
||||||
|
#define CPU_HAS_BITBAND 1
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -44,6 +44,15 @@ extern "C"
|
|||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Bit-Band configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#ifdef BITBAND_REG32
|
||||||
|
#define CPU_HAS_BITBAND 1
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -58,6 +58,7 @@ extern "C" {
|
|||||||
#define CPU_DEFAULT_IRQ_PRIO (1U)
|
#define CPU_DEFAULT_IRQ_PRIO (1U)
|
||||||
#define CPU_IRQ_NUMOF (139U)
|
#define CPU_IRQ_NUMOF (139U)
|
||||||
#define CPU_FLASH_BASE FLASH_BASE
|
#define CPU_FLASH_BASE FLASH_BASE
|
||||||
|
#define CPU_HAS_BITBAND (1)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -36,6 +36,7 @@ extern "C" {
|
|||||||
#define CPU_DEFAULT_IRQ_PRIO (1U)
|
#define CPU_DEFAULT_IRQ_PRIO (1U)
|
||||||
#define CPU_IRQ_NUMOF (35U)
|
#define CPU_IRQ_NUMOF (35U)
|
||||||
#define CPU_FLASH_BASE LPC_FLASH_BASE
|
#define CPU_FLASH_BASE LPC_FLASH_BASE
|
||||||
|
#define CPU_HAS_BITBAND (1)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -34,6 +34,7 @@ extern "C" {
|
|||||||
#define CPU_DEFAULT_IRQ_PRIO (1U)
|
#define CPU_DEFAULT_IRQ_PRIO (1U)
|
||||||
#define CPU_IRQ_NUMOF PERIPH_COUNT_IRQn
|
#define CPU_IRQ_NUMOF PERIPH_COUNT_IRQn
|
||||||
#define CPU_FLASH_BASE IFLASH0_ADDR
|
#define CPU_FLASH_BASE IFLASH0_ADDR
|
||||||
|
#define CPU_HAS_BITBAND (1)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@ -174,6 +174,15 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Bit-Band configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#ifdef SRAM_BB_BASE
|
||||||
|
#define CPU_HAS_BITBAND 1
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user