Skip to content

Commit c36980c

Browse files
committed
Fix a build break with ARM compiler
1 parent eebe00b commit c36980c

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/device/system_CC3220SF.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,12 @@ void SystemInit (void)
6262
SCB->VTOR = (uint32_t) &__Vectors;
6363
CC3220SF_LAUNCHXL_initGeneral();
6464
}
65+
66+
/*
67+
* ======== ClockP_getCpuFreq ========
68+
*/
69+
void ClockP_getCpuFreq(ClockP_FreqHz *freq)
70+
{
71+
freq->lo = (uint32_t)SystemCoreClock;
72+
freq->hi = 0;
73+
}

targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/device/system_CC3220SF.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ extern "C" {
3232

3333
#include <stdio.h>
3434
#include "ti/drivers/net/wifi/wlan.h"
35+
#include "ti/drivers/dpl/ClockP.h"
3536

3637
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
3738

targets/TARGET_TI/TARGET_CC32XX/TARGET_CC3220SF/ti/drivers/pwm/PWMTimerCC32XX.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ static const uint32_t gpioPinIndexes[8] = {
152152
#define PinConfigPinMode(config) (((config) >> 8) & 0xF)
153153
#define PinConfigPin(config) (((config) >> 0) & 0x3F)
154154

155-
extern uint32_t SystemCoreClock;
156-
157155
/*
158156
* ======== getDutyCounts ========
159157
*/
@@ -163,10 +161,7 @@ static uint32_t getDutyCounts(PWM_Duty_Units dutyUnits, uint32_t dutyValue,
163161
uint32_t duty = 0;
164162
ClockP_FreqHz freq;
165163

166-
freq.hi = 0;
167-
freq.lo = SystemCoreClock;
168-
169-
//ClockP_getCpuFreq(&freq);
164+
ClockP_getCpuFreq(&freq);
170165

171166
switch (dutyUnits) {
172167
case PWM_DUTY_COUNTS:
@@ -199,10 +194,7 @@ static uint32_t getPeriodCounts(PWM_Period_Units periodUnits,
199194
uint32_t period = 0;
200195
ClockP_FreqHz freq;
201196

202-
freq.hi = 0;
203-
freq.lo = SystemCoreClock;
204-
205-
//ClockP_getCpuFreq(&freq);
197+
ClockP_getCpuFreq(&freq);
206198

207199
switch (periodUnits) {
208200
case PWM_PERIOD_COUNTS:

0 commit comments

Comments
 (0)