Fix a build break with ARM compiler

pull/11063/head
Lin Gao 2019-07-31 11:51:20 -05:00
parent eebe00b9d1
commit c36980c370
3 changed files with 12 additions and 10 deletions

View File

@ -62,3 +62,12 @@ void SystemInit (void)
SCB->VTOR = (uint32_t) &__Vectors;
CC3220SF_LAUNCHXL_initGeneral();
}
/*
* ======== ClockP_getCpuFreq ========
*/
void ClockP_getCpuFreq(ClockP_FreqHz *freq)
{
freq->lo = (uint32_t)SystemCoreClock;
freq->hi = 0;
}

View File

@ -32,6 +32,7 @@ extern "C" {
#include <stdio.h>
#include "ti/drivers/net/wifi/wlan.h"
#include "ti/drivers/dpl/ClockP.h"
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */

View File

@ -152,8 +152,6 @@ static const uint32_t gpioPinIndexes[8] = {
#define PinConfigPinMode(config) (((config) >> 8) & 0xF)
#define PinConfigPin(config) (((config) >> 0) & 0x3F)
extern uint32_t SystemCoreClock;
/*
* ======== getDutyCounts ========
*/
@ -163,10 +161,7 @@ static uint32_t getDutyCounts(PWM_Duty_Units dutyUnits, uint32_t dutyValue,
uint32_t duty = 0;
ClockP_FreqHz freq;
freq.hi = 0;
freq.lo = SystemCoreClock;
//ClockP_getCpuFreq(&freq);
ClockP_getCpuFreq(&freq);
switch (dutyUnits) {
case PWM_DUTY_COUNTS:
@ -199,10 +194,7 @@ static uint32_t getPeriodCounts(PWM_Period_Units periodUnits,
uint32_t period = 0;
ClockP_FreqHz freq;
freq.hi = 0;
freq.lo = SystemCoreClock;
//ClockP_getCpuFreq(&freq);
ClockP_getCpuFreq(&freq);
switch (periodUnits) {
case PWM_PERIOD_COUNTS: