* Global variables shared between an interrupt and the main code should be volatile See: https://www.embedded.com/electronics-blogs/beginner-s-corner/4023801/Introduction-to-the-Volatile-Keyword * There is no reason to change the active report if it has not changed * Declare local functions and variables static This both helps the compiler and the programmer
20 lines
356 B
C
20 lines
356 B
C
#ifndef __INIT_PERIPHERALS_H__
|
|
#define __INIT_PERIPHERALS_H__
|
|
|
|
// Includes
|
|
|
|
#include "fsl_common.h"
|
|
|
|
// Variables:
|
|
|
|
extern bool IsBusPalOn;
|
|
extern volatile uint32_t I2cMainBusRequestedBaudRateBps;
|
|
extern volatile uint32_t I2cMainBusActualBaudRateBps;
|
|
|
|
// Functions:
|
|
|
|
void InitPeripherals(void);
|
|
void ReinitI2cMainBus(void);
|
|
|
|
#endif
|