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_chip_pic.h File Reference

Common macros for PIC. More...

#include "xc.h"
Include dependency graph for arm_chip_pic.h:

Macros

#define diInterrupts()   __builtin_disable_interrupts()
 Disable interruptions macro.
 
#define enInterrupts()   __builtin_enable_interrupts()
 Enable interruptions macro.
 
#define HAL_MAX_TICKS   ((uint32_t) -1)
 Max Ticks value.
 
#define HAL_MS_TICKS_FACTOR   1
 Milliseconds multiplier (depending tick counter frequency)
 

Typedefs

typedef enum eResetSource eResetSource
 

Enumerations

enum  eResetSource { RST_POR = 1 , RST_UNKNOWN = 0xFF }
 Source of last reset. More...
 

Detailed Description

Common macros for PIC.

Author
SMFSW
Warning
Do not use macros for function qualifiers in this file
Attention
On PIC families you should configure a timer to count for ms. A TIM peripheral shall be configured in MCC or Harmony (with a period of 1ms).

HAL_GetTick shall be known to sarmfsw. As no specific project header is included yet in this file, external definition is provided.

#include <stdint.h>
uint32_t HAL_GetTick(void);
MISRA C:2012 Deviations
Header scope deviation has been granted for following rules:
Rule-20.5 - Advisory: #undef (misra-c2012-20.5)

Macro Definition Documentation

◆ diInterrupts

#define diInterrupts ( )    __builtin_disable_interrupts()

Disable interruptions macro.

◆ enInterrupts

#define enInterrupts ( )    __builtin_enable_interrupts()

Enable interruptions macro.

◆ HAL_MAX_TICKS

#define HAL_MAX_TICKS   ((uint32_t) -1)

Max Ticks value.

Note
Define HAL_MAX_TICKS with custom max value in project if tick max value is not using 32b variable full scale

◆ HAL_MS_TICKS_FACTOR

#define HAL_MS_TICKS_FACTOR   1

Milliseconds multiplier (depending tick counter frequency)

Note
Define HAL_MS_TICKS_FACTOR with custom multiplier in project if tick period is not 1ms

Typedef Documentation

◆ eResetSource

typedef enum eResetSource eResetSource

Enumeration Type Documentation

◆ eResetSource

Source of last reset.

Enumerator
RST_POR 

Power On Reset.

RST_UNKNOWN 

Unknown Reset Source.