Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
65a3ae90bb | |||
bc7b879db2 |
6 changed files with 26 additions and 42 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
uint32_t SystemCoreClock = SYSCLK_FREQ_72MHz; /*!< System Clock Frequency (Core Clock) */
|
||||
|
||||
__I uint8_t AHBPrescTable[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9 };
|
||||
static const uint8_t AHBPrescTable[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9 };
|
||||
|
||||
uint32_t hse_value = 8000000;
|
||||
|
||||
|
|
|
@ -190,8 +190,8 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
static __I uint8_t APBAHBPrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7, 8, 9};
|
||||
static __I uint8_t ADCPrescTable[4] = {2, 4, 6, 8};
|
||||
static const uint8_t APBAHBPrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7, 8, 9};
|
||||
static const uint8_t ADCPrescTable[4] = {2, 4, 6, 8};
|
||||
extern uint32_t hse_value;
|
||||
|
||||
/**
|
||||
|
|
|
@ -83,7 +83,7 @@ static char lineBuffer[SCREEN_CHARACTER_COLUMN_COUNT + 1];
|
|||
#define HALF_SCREEN_CHARACTER_COLUMN_COUNT (SCREEN_CHARACTER_COLUMN_COUNT / 2)
|
||||
#define IS_SCREEN_CHARACTER_COLUMN_COUNT_ODD (SCREEN_CHARACTER_COLUMN_COUNT & 1)
|
||||
|
||||
const char* pageTitles[] = {
|
||||
static const char* const pageTitles[] = {
|
||||
"CLEANFLIGHT",
|
||||
"ARMED",
|
||||
"BATTERY",
|
||||
|
|
|
@ -140,12 +140,12 @@ void useRcControlsConfig(modeActivationCondition_t *modeActivationConditions, es
|
|||
#define BASEFLIGHT_IDENTIFIER "BAFL";
|
||||
|
||||
#define FLIGHT_CONTROLLER_IDENTIFIER_LENGTH 4
|
||||
static const char *flightControllerIdentifier = CLEANFLIGHT_IDENTIFIER; // 4 UPPER CASE alpha numeric characters that identify the flight controller.
|
||||
static const char * const flightControllerIdentifier = CLEANFLIGHT_IDENTIFIER; // 4 UPPER CASE alpha numeric characters that identify the flight controller.
|
||||
|
||||
#define FLIGHT_CONTROLLER_VERSION_LENGTH 3
|
||||
#define FLIGHT_CONTROLLER_VERSION_MASK 0xFFF
|
||||
|
||||
const char *boardIdentifier = TARGET_BOARD_IDENTIFIER;
|
||||
static const char * const boardIdentifier = TARGET_BOARD_IDENTIFIER;
|
||||
#define BOARD_IDENTIFIER_LENGTH 4 // 4 UPPER CASE alpha numeric characters that identify the board being used.
|
||||
#define BOARD_HARDWARE_REVISION_LENGTH 2
|
||||
|
||||
|
@ -396,40 +396,24 @@ static mspPort_t mspPorts[MAX_MSP_PORT_COUNT];
|
|||
|
||||
static mspPort_t *currentPort;
|
||||
|
||||
static void serialize32(uint32_t a)
|
||||
{
|
||||
static uint8_t t;
|
||||
t = a;
|
||||
serialWrite(mspSerialPort, t);
|
||||
currentPort->checksum ^= t;
|
||||
t = a >> 8;
|
||||
serialWrite(mspSerialPort, t);
|
||||
currentPort->checksum ^= t;
|
||||
t = a >> 16;
|
||||
serialWrite(mspSerialPort, t);
|
||||
currentPort->checksum ^= t;
|
||||
t = a >> 24;
|
||||
serialWrite(mspSerialPort, t);
|
||||
currentPort->checksum ^= t;
|
||||
}
|
||||
|
||||
static void serialize16(int16_t a)
|
||||
{
|
||||
static uint8_t t;
|
||||
t = a;
|
||||
serialWrite(mspSerialPort, t);
|
||||
currentPort->checksum ^= t;
|
||||
t = a >> 8 & 0xff;
|
||||
serialWrite(mspSerialPort, t);
|
||||
currentPort->checksum ^= t;
|
||||
}
|
||||
|
||||
static void serialize8(uint8_t a)
|
||||
{
|
||||
serialWrite(mspSerialPort, a);
|
||||
currentPort->checksum ^= a;
|
||||
}
|
||||
|
||||
static void serialize16(uint16_t a)
|
||||
{
|
||||
serialize8((uint8_t)(a >> 0));
|
||||
serialize8((uint8_t)(a >> 8));
|
||||
}
|
||||
|
||||
static void serialize32(uint32_t a)
|
||||
{
|
||||
serialize16((uint16_t)(a >> 0));
|
||||
serialize16((uint16_t)(a >> 16));
|
||||
}
|
||||
|
||||
static uint8_t read8(void)
|
||||
{
|
||||
return currentPort->inBuf[currentPort->indRX++] & 0xff;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
char *targetName = __TARGET__;
|
||||
char *shortGitRevision = __REVISION__;
|
||||
char *buildDate = __DATE__;
|
||||
char *buildTime = __TIME__;
|
||||
const char * const targetName = __TARGET__;
|
||||
const char * const shortGitRevision = __REVISION__;
|
||||
const char * const buildDate = __DATE__;
|
||||
const char * const buildTime = __TIME__;
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
|
||||
#define MW_VERSION 231
|
||||
|
||||
extern char* targetName;
|
||||
extern const char* const targetName;
|
||||
|
||||
#define GIT_SHORT_REVISION_LENGTH 7 // lower case hexadecimal digits.
|
||||
extern char* shortGitRevision;
|
||||
extern const char* const shortGitRevision;
|
||||
|
||||
#define BUILD_DATE_LENGTH 11
|
||||
extern char* buildDate; // "MMM DD YYYY" MMM = Jan/Feb/...
|
||||
extern const char* const buildDate; // "MMM DD YYYY" MMM = Jan/Feb/...
|
||||
|
||||
#define BUILD_TIME_LENGTH 8
|
||||
extern char* buildTime; // "HH:MM:SS"
|
||||
extern const char* const buildTime; // "HH:MM:SS"
|
||||
|
|
Loading…
Reference in a new issue