sarmfsw: SMFSW Toolbox (for ARM & compatible with Arduino platform) 3.7
SMFSW collection of miscellaneous functions & macros (for ARM & compatible with Arduino platform)
Loading...
Searching...
No Matches
arm_cmsis.h File Reference

ARM link with CMSIS files. More...

This graph shows which files directly or indirectly include this file:

Macros

#define diInterrupts()   __disable_irq()
 Disable interruptions macro.
 
#define enInterrupts()   __enable_irq()
 Enable interruptions macro.
 
#define CORE_CMSIS_VERSION   __CM_CMSIS_VERSION
 CMSIS Core version alias.
 
#define CORTEX_M   __CORTEX_M
 ARM Cortex type alias.
 
#define HALTICKS_PROTOTYPE(func)   uint32_t func(void)
 External definition of Ticks getter that shall be implemented in project.
 
#define HALTicks   HAL_GetTick
 Alias for HAL get ticks function.
 
#define HAL_MS_TICKS_FACTOR   1U
 HAL milliseconds multiplier (depending tick counter frequency)
 
#define UNUSED(X)   (void) (X)
 Unused parameter X (to avoid gcc/g++ warnings)
 
#define UNUSED_RET   (void)
 Explicitly ignore function return (MISRA compliance)
 

Functions

 HALTICKS_PROTOTYPE (HAL_GetTick)
 External definition of HAL_GetTick that shall be defined in project.
 

Detailed Description

ARM link with CMSIS files.

Author
SMFSW
Warning
Latest ARM chips might now be recognized; if not, define at project level:
  • for STM32 families (STMicroelectronics):
    • STM_FAMILY xy:
      • x : c/f/h/l/mp/u/wb/wl
      • y : sub-family number
  • for SAM families (Atmel):
    • SAM_FAMILY xy(yy)
  • for PIC families (Microchip):
    • PIC_FAMILY pic(xx)
  • for Other families (TI...):
    • not implemented yet
MISRA C:2012 Deviations
Header scope derogation to following rules:
Rule-21.1 - Required: #define and #undef on reserved identifiers (misra-c2012-21.1)
Justification: define generic CMSIS IO macros in case not already defined.

Macro Definition Documentation

◆ CORE_CMSIS_VERSION

#define CORE_CMSIS_VERSION   __CM_CMSIS_VERSION

CMSIS Core version alias.

◆ CORTEX_M

#define CORTEX_M   __CORTEX_M

ARM Cortex type alias.

◆ diInterrupts

#define diInterrupts ( )    __disable_irq()

Disable interruptions macro.

◆ enInterrupts

#define enInterrupts ( )    __enable_irq()

Enable interruptions macro.

◆ HAL_MS_TICKS_FACTOR

#define HAL_MS_TICKS_FACTOR   1U

HAL milliseconds multiplier (depending tick counter frequency)

◆ HALTicks

#define HALTicks   HAL_GetTick

Alias for HAL get ticks function.

◆ HALTICKS_PROTOTYPE

#define HALTICKS_PROTOTYPE ( func)    uint32_t func(void)

External definition of Ticks getter that shall be implemented in project.

MISRA C:2012 Deviations
Local derogation authorized for:
Rule-20.7 - Required: Enclosed macro parameters expansion (misra-c2012-20.7)
Justification: func paramater shall be a function name; raising error otherwise is intended.

◆ UNUSED

#define UNUSED ( X)    (void) (X)

Unused parameter X (to avoid gcc/g++ warnings)

◆ UNUSED_RET

#define UNUSED_RET   (void)

Explicitly ignore function return (MISRA compliance)

Function Documentation

◆ HALTICKS_PROTOTYPE()

HALTICKS_PROTOTYPE ( HAL_GetTick )

External definition of HAL_GetTick that shall be defined in project.