14 #ifndef STM32W108XX_MICRO_COMMON_H_
15 #define STM32W108XX_MICRO_COMMON_H_
17 #ifndef DOXYGEN_SHOULD_SKIP_THIS
18 #ifndef __STSTATUS_TYPE__
19 #define __STSTATUS_TYPE__
23 typedef uint8_t StStatus;
24 #endif //__STSTATUS_TYPE__
25 #endif // DOXYGEN_SHOULD_SKIP_THIS
27 #define PORTA (0 << 3)
28 #define PORTB (1 << 3)
29 #define PORTC (2 << 3)
36 #define PORTA_PIN(y) (PORTA|y)
42 #define PORTB_PIN(y) (PORTB|y)
48 #define PORTC_PIN(y) (PORTC|y)
55 #define PORTx_PIN(x, y) (x|y)
286 #endif //STM32W108XX_MICRO_COMMON_H_
void halCommonCalibratePads(void)
Calibrates the GPIO pads.
void halSleepWithOptions(SleepModes sleepMode, uint32_t gpioWakeBitMask)
Puts the microcontroller to sleep in a specified mode, allows the GPIO wake sources to be determined ...
void halInternalIdleSleep(void)
Provides access to assembly code which triggers idle sleep.
void halInternalCalibrateFastRc(void)
Calibrates the internal FastRC to generate a 12Mhz clock.
uint16_t stMeasureVddFast(void)
Takes a fast ADC measurement of VDD_PADS in millivolts.
uint16_t stMeasureVddSlow(void)
Takes a slow ADC measurement of VDD_PADS in millivolts.
uint16_t halCommonGetRandom(void)
Runs a standard LFSR to generate pseudorandom numbers.
void halCommonSeedRandom(uint32_t seed)
Seeds the halCommonGetRandom() pseudorandom number generator.
StStatus halSleepForQsWithOptions(uint32_t *duration, uint32_t gpioWakeBitMask)
Uses the system timer to enter ::SLEEPMODE_WAKETIMER for approximately the specified amount of time (...
void halInternalSleep(SleepModes sleepMode)
Puts the microcontroller to sleep in a specified mode.
void halInternalSetRegTrim(boolean boostMode)
Sets the trim values for the 1.8V and 1.2V regulators based upon manufacturing configuration.
void halInternalSearchForBiasTrim(void)
Search for optimal 24MHz crystal bias trim, assuming no valid prior value.
void halGpioSet(uint32_t gpio, boolean value)
Set/Clear single GPIO bit.
uint32_t halGetWakeInfo(void)
Obtains the events that caused the last wake from sleep.
void halInternalSwitchToXtal(void)
Switches to running off of the 24MHz crystal, including changing the CPU to be 24MHz (FCLK sourced fr...
void halCommonDelayMilliseconds(uint16_t ms)
Blocks the current thread of execution for the specified amount of time, in milliseconds.
void halCommonCheckXtalBiasTrim(void)
This function is intended to be called periodically, from the stack and application, to check the XTAL bias trim is within appropriate levels and adjust if not.
void halInternalResetWatchDog(void)
Resets the watchdog timer.
void halGpioConfig(uint32_t io, uint32_t config)
Configure an IO pin's operating mode.
void halInternalCalibrateSlowRc(void)
Calibrates the internal SlowRC to generate a 1024 Hz (1kHz) clock.