// ***********************************************************************
// Program - Fong Bliny
// Function - Blink LED
// Author - TL Fong
// Build - 2013.08.19.01
// Date - 2013aug19hkt0917
// Hardware - LPC1114/102, LPC1114/301
// Software - GCC ARM 4.7, CoIDE 1.7.4, CoLinkEx 1.1, Flash Magic v7.51
// ***********************************************************************
void BlinkExp();
void FongBlink011();
void FongBlink013();
int main(void)
{
// BlinkExp(); // 2013aug18
// FongBlink011(); // 2013aug19
FongBlink013(); // 2013aug19
}
#include "lpc11xx_syscon.h"
#include "lpc11xx_gpio.h"
#include "lpc11xx_iocon.h"
void FongBlink013()
{
FongBlink011();
// FongBlink012();
}
void FongBlink012() // 2013aug19hkt1052
{
FongBlink011();
/*
void SysTick_Handler(void);
void delayMilliSecond(uint32_t mS);
void delayTenthSecond(int count);
GPIO_TypeDef *getGpioStructPointer(int portNumber);
gpioPortStructPinStruct *getGpioPortStructPinStructPointer(portNumber portNumber, pinNumber pinNumber);
void setGpioDirectionRegisterBitInput(GPIO_TypeDef *gpio_struct_ptr, int bitNumber);
void setGpioDirectionRegisterBitOutput(GPIO_TypeDef *gpio_struct_ptr, int bitNumber);
void setGpioDataRegisterBitLow(GPIO_TypeDef *gpio_struct_ptr, int bitNumber);
void setGpioDataRegisterBitHigh(GPIO_TypeDef *gpio_struct_ptr, int bitNumber);
void setPortPinDirection(GPIO_TypeDef *gpio_struct_ptr, int pinNumber, directionValue directionValue);
void setPortPinData(GPIO_TypeDef *gpio_struct_ptr, int pinNumber, logicLevelValue logicLevelValue);
logicLevelValue getGpioDataRegisterBitValue(GPIO_TypeDef *gpio_struct_ptr, int bitPosition);
portNumber getPortNumber061(portPinArray portPinArray);
portNumber getPortNumber06(portPinArrayPointerArray portPinArrayPointerArray, deviceNumber deviceNumber);
pinNumber getPinNumber061(portPinArray portPinArray);
pinNumber getPinNumber06(portPinArrayPointerArray portPinArrayPointerArray, deviceNumber deviceNumber);
void initializeLedPortPin06(portPinArrayPointerArray portPinArrayPointerArray, deviceNumber ledNumber);
void initializeAllLedPortPin06(portPinArrayPointerArray ledPortPinArrayPointerArray, int maxLedNumber);
void blinkLed06(portPinArrayPointerArray portPinArrayPointerArray, deviceNumber ledNumber, int onTime, int offTime, int blinkCount);
void testBlinkLed06(portPinArrayPointerArray portPinArrayPointerArray, int maxLedNumber, int onTime, int offTime, int blinkCount);
void blinkFongLedList1();
void blink5Leds();
void testBlinkLed063(); // using mcuBoardStruct, not working !!!
*/
// ***********************************************************************
// GPIO, timer, peripheral numbering
// ***********************************************************************
// *** Port and pin numbers ***
typedef const int portNumber;
portNumber Port0 = 0;
portNumber Port1 = 1;
portNumber Port2 = 2;
portNumber Port3 = 3;
portNumber Port4 = 4;
typedef const int pinNumber;
pinNumber Pin0 = 0;
pinNumber Pin1 = 1;
pinNumber Pin2 = 2;
pinNumber Pin3 = 3;
pinNumber Pin4 = 4;
pinNumber Pin5 = 5;
pinNumber Pin6 = 6;
pinNumber Pin7 = 7;
pinNumber Pin8 = 8;
pinNumber Pin9 = 9;
pinNumber Pin10 = 10;
pinNumber Pin11 = 11;
// *** Device numbers ***
typedef const int deviceNumber;
deviceNumber Device1 = 1;
deviceNumber Device2 = 2;
deviceNumber Device3 = 3;
deviceNumber Device4 = 4;
deviceNumber Device5 = 5;
deviceNumber Device6 = 6;
deviceNumber Led1 = Device1;
deviceNumber Led2 = Device2;
deviceNumber Led3 = Device3;
deviceNumber Led4 = Device4;
deviceNumber Led5 = Device5;
deviceNumber Key1 = Device1;
deviceNumber Key2 = Device2;
deviceNumber Key3 = Device3;
deviceNumber Key4 = Device4;
deviceNumber Key5 = Device5;
deviceNumber Pwm1 = Device1;
deviceNumber Pwm2 = Device2;
deviceNumber Pwm3 = Device3;
deviceNumber Pwm4 = Device4;
deviceNumber Pwm5 = Device5;
// ***********************************************************************
// CMSIS port pin timer
// ***********************************************************************
typedef const int gpioPortPinNumber;
gpioPortPinNumber Pio08 = 8;
gpioPortPinNumber Pio09 = 9;
gpioPortPinNumber Rpio11 = 11;
gpioPortPinNumber Rpio12 = 12;
gpioPortPinNumber Pio19 = 19;
gpioPortPinNumber Pio110 = 110;
typedef const int timerNumber;
timerNumber Ct16b0 = 0;
timerNumber Ct16b1 = 1;
timerNumber Ct32b0 = 2;
timerNumber Ct32b1 = 3;
typedef const int matchRegisterNumber;
matchRegisterNumber MatchRegister0 = 0;
matchRegisterNumber MatchRegister1 = 1;
matchRegisterNumber MatchRegister2 = 2;
// ***********************************************************************
// CMSIS port pin timer
// ***********************************************************************
typedef int portPinArray[2];
const int MaxBoardDeviceNumber = 5;
const int MaxFongBoardLedNumber = 5;
const int MaxFongBoardKeyNumber = 3;
const int MaxFongBoardPwmNumber = 5;
#define MAX_MPU_BOARD_DEVICE_NUMBER 5
#define MAX_FONG_BOARD_LED_NUMBER 5
#define MAX_FONG_BOARD_KEY_NUMBER 5
#define MAX_FONG_BOARD_PWM_NUMBER 5
typedef int portPinArrayIndex;
portPinArrayIndex PortIndex = 0;
portPinArrayIndex PinIndex = 1;
// *** Led/Key/Pwm configuration ***
portPinArray FongLedPortPinArray1 = {Port0, Pin5};
portPinArray FongLedPortPinArray2 = {Port0, Pin6};
portPinArray FongLedPortPinArray3 = {Port0, Pin3};
portPinArray FongLedPortPinArray4 = {Port0, Pin4};
portPinArray FongLedPortPinArray5 = {Port0, Pin7};
portPinArray FongKeyPortPinArray1 = {Port1, Pin0};
portPinArray FongKeyPortPinArray2 = {Port1, Pin5};
portPinArray FongKeyPortPinArray3 = {Port1, Pin8};
portPinArray FongPwmPortPinArray1 = {Port0, Pin8};
portPinArray FongPwmPortPinArray2 = {Port0, Pin9};
portPinArray FongPwmPortPinArray3 = {Port1, Pin1};
portPinArray FongPwmPortPinArray4 = {Port1, Pin2};
portPinArray FongPwmPortPinArray5 = {Port1, Pin9};
portPinArray FongPwmPortPinArray6 = {Port1, Pin10};
// *** portPinArrayPointerArray - array of pointers to portPinArray ***
typedef portPinArray *portPinArrayPointerArray[MAX_MPU_BOARD_DEVICE_NUMBER];
portPinArrayPointerArray FongLedList1[MAX_FONG_BOARD_LED_NUMBER] =
{
&FongLedPortPinArray1, &FongLedPortPinArray2, &FongLedPortPinArray3, &FongLedPortPinArray4, &FongLedPortPinArray5,
};
portPinArrayPointerArray FongKeyList1[MAX_FONG_BOARD_KEY_NUMBER] =
{
&FongKeyPortPinArray1, &FongKeyPortPinArray2, &FongKeyPortPinArray3
};
portPinArrayPointerArray FongPwmList1[MAX_FONG_BOARD_PWM_NUMBER] =
{
&FongPwmPortPinArray1,
&FongPwmPortPinArray2,
&FongPwmPortPinArray3,
&FongPwmPortPinArray4,
&FongPwmPortPinArray5,
&FongPwmPortPinArray6
};
// *** Evaluation board structure ***
typedef struct
{
portPinArrayPointerArray *LedPortPinArrayPointerArray;
portPinArrayPointerArray *KeyPortPinArrayPointerArray;
portPinArrayPointerArray *PwmPortPinArrayPointerArray;
} mcuBoardStruct;
mcuBoardStruct *CreateFongBoardStruct()
{
mcuBoardStruct *FongBoardStruct;
FongBoardStruct->LedPortPinArrayPointerArray = FongLedList1;
FongBoardStruct->KeyPortPinArrayPointerArray = FongKeyList1;
FongBoardStruct->PwmPortPinArrayPointerArray = FongPwmList1;
return FongBoardStruct;
}
// ***********************************************************************
// Delay functions and count constants
// ***********************************************************************
static volatile uint32_t TimeTick = 0;
void SysTick_Handler(void)
{
TimeTick++;
}
void delayMilliSecond(uint32_t mS)
{
SysTick->LOAD = (((24000)*mS)-1);
SysTick->VAL = 0;
SysTick->CTRL |= ((1<<1)|(1<<0));
while(!TimeTick)
{
};
TimeTick = 0;
SysTick->CTRL =0;
}
void delayTenthSecond(int count)
{
int i, j, k;
for (i = 0; i < count; i++)
{
for (j = 0; j < 0x4; j++)
{
for (k = 0; k < 0x000BB00; k++)
{
}
}
}
}
// *** Loop constants ***
typedef int repeatCount;
repeatCount OneTime = 1;
repeatCount TwoTimes = 2;
repeatCount ThreeTimes = 3;
repeatCount FourTimes = 4;
repeatCount FiveTimes = 5;
repeatCount SixTimes = 6;
repeatCount EightTimes = 8;
repeatCount TenTimes = 10;
repeatCount TwentyTimes = 20;
// ***********************************************************************
// GPIO basic functions
// ***********************************************************************
// * typedefs and #defines *
typedef int directionValue;
directionValue InputDirection = 0;
directionValue OutputDirection = 1;
typedef int logicLevelValue;
logicLevelValue LogicLevelLow = 0;
logicLevelValue LogicLevelHigh = 1;
#define LOW 0
#define HIGH 1
// ***********************************************************************
// Name - GpioStructPointerArray
// Description - Contains the 4 CMSIS port control structures
// ***********************************************************************
typedef GPIO_TypeDef *gpioStructPointerArray[4];
gpioStructPointerArray GpioStructPointerArray = {LPC_GPIO0, LPC_GPIO1, LPC_GPIO2, LPC_GPIO3};
// ***********************************************************************
// Name - getGpioStructPointer
// Input - port number
// Output - GPIO control/data structure pointer
// ***********************************************************************
GPIO_TypeDef *getGpioStructPointer(int portNumber)
{
GPIO_TypeDef *gpioStructPointer;
gpioStructPointer = GpioStructPointerArray[portNumber];
return gpioStructPointer;
}
typedef struct
{
GPIO_TypeDef *GpioStructPointer;
int PinNumber;
} gpioPortStructPinStruct;
gpioPortStructPinStruct *getGpioPortStructPinStructPointer(portNumber portNumber, pinNumber pinNumber)
{
gpioPortStructPinStruct *gpioPortStructPinStruct;
gpioPortStructPinStruct->GpioStructPointer = getGpioStructPointer(portNumber);
gpioPortStructPinStruct->PinNumber = pinNumber;
return gpioPortStructPinStruct;
}
// ***********************************************************************
// Name - setGpioDirectionRegisterBitInput
// Input - port control structure, pin number
// Output - set pin as input
// ***********************************************************************
void setGpioDirectionRegisterBitInput(GPIO_TypeDef *gpio_struct_ptr, int bitNumber)
{
gpio_struct_ptr->DIR &= ~(1 << bitNumber);
}
// ***********************************************************************
// Name - setGpioDirectionRegisterBitOutput
// Input - port control structure, pin number
// Output - set pin as output
// ***********************************************************************
void setGpioDirectionRegisterBitOutput(GPIO_TypeDef *gpio_struct_ptr, int bitNumber)
{
gpio_struct_ptr->DIR |= (1 << bitNumber);
}
// ***********************************************************************
// Name - setGpioDataRegisterBitLow
// Input - port control structure, pin number
// Output - set pin as output
// ***********************************************************************
void setGpioDataRegisterBitLow(GPIO_TypeDef *gpio_struct_ptr, int bitNumber)
{
gpio_struct_ptr->DATA &= ~(1 << bitNumber);
}
// ***********************************************************************
// Name - setGpioDataRegisterBitHigh
// Input - port control structure, pin number
// Output - set pin as output
// ***********************************************************************
void setGpioDataRegisterBitHigh(GPIO_TypeDef *gpio_struct_ptr, int bitNumber)
{
gpio_struct_ptr->DATA |= (1 << bitNumber);
}
// ***********************************************************************
// Name - setGpioDirectionRegister
// Input - port control structure, pin number, direction value
// Output - set pin as input or output
// ***********************************************************************
void setPortPinDirection(GPIO_TypeDef *gpio_struct_ptr, int pinNumber, directionValue directionValue)
{
if (directionValue == InputDirection)
setGpioDirectionRegisterBitInput(gpio_struct_ptr, pinNumber);
else
setGpioDirectionRegisterBitOutput(gpio_struct_ptr, pinNumber);
}
// ***********************************************************************
// Name - setGpioDataRegister
// Input - port control structure, pin number, data value
// Output - none
// ***********************************************************************
void setPortPinData(GPIO_TypeDef *gpio_struct_ptr, int pinNumber, logicLevelValue logicLevelValue)
{
if (logicLevelValue == LogicLevelLow)
setGpioDataRegisterBitLow(gpio_struct_ptr, pinNumber);
else
setGpioDataRegisterBitHigh(gpio_struct_ptr, pinNumber);
}
// ***********************************************************************
// Function - getGpioDataRegisterBitValue
// Input - GPIO structure pointer, bit position
// Output - port pin data bit
// ***********************************************************************
logicLevelValue getGpioDataRegisterBitValue(GPIO_TypeDef *gpio_struct_ptr, int bitPosition)
{
logicLevelValue logicLevelValue;
int GpioDataRegisterMask = (1 << bitPosition);
if ((gpio_struct_ptr->DATA &= GpioDataRegisterMask) == GpioDataRegisterMask)
logicLevelValue = HIGH;
else
logicLevelValue = LOW;
return logicLevelValue;
}
// ***********************************************************************
// Name - get port number for portPinArray
// Input - port pin array
// Output - portNumber
// ***********************************************************************
portNumber getPortNumber061(portPinArray portPinArray)
{
int portNumber;
portNumber = portPinArray[PortIndex];
return portNumber;
}
// ***********************************************************************
// Name - get port number from portPinArrayPointerArray
// Input - portPinPointerArray, deviceNumber
// Output - portNumber
// ***********************************************************************
portNumber getPortNumber06(portPinArrayPointerArray portPinArrayPointerArray, deviceNumber deviceNumber)
{
int portNumber;
portNumber = getPortNumber061(*portPinArrayPointerArray[deviceNumber - 1]);
return portNumber;
}
// ***********************************************************************
// Name - get pin number for portPinArray
// Input - port pin array
// Output - pinNumber
// ***********************************************************************
pinNumber getPinNumber061(portPinArray portPinArray)
{
int pinNumber;
pinNumber = portPinArray[PinIndex];
return pinNumber;
}
// ***********************************************************************
// Name - get pin number from portPinArrayPointerArray and index
// Input - portPinPointerArray, index
// Output - pinNumber
// ***********************************************************************
pinNumber getPinNumber06(portPinArrayPointerArray portPinArrayPointerArray, deviceNumber deviceNumber)
{
int pinNumber;
pinNumber = getPinNumber061(*portPinArrayPointerArray[deviceNumber - 1]);
return pinNumber;
}
// ***********************************************************************
// ***********************************************************************
// LED functions
// ***********************************************************************
// ***********************************************************************
// ***********************************************************************
// Name - initialize LED port pin
// Input - portPinPointerArray, index
// Output - none
// ***********************************************************************
void initializeLedPortPin06(portPinArrayPointerArray portPinArrayPointerArray, deviceNumber ledNumber)
{
int portNumber;
int pinNumber;
GPIO_TypeDef *gpioStructPointer;
portNumber = getPortNumber06(portPinArrayPointerArray, ledNumber);
pinNumber = getPinNumber06(portPinArrayPointerArray, ledNumber);
// *** the 3 lines below are not working, don't know why - tlfong01 2013aug17 ***
// gpioPortStructPinStruct *gpioPortStructPinStructPointer;
// gpioPortStructPinStructPointer = getGpioPortStructPinStructPointer(portNumber, pinNumber);
// gpioStructPointer = gpioPortStructPinStructPointer -> GpioStructPointer;
gpioStructPointer = getGpioStructPointer(portNumber);
setPortPinDirection(gpioStructPointer, pinNumber, OutputDirection);
}
// ***********************************************************************
// Function - initialize all LED port pins
// Input - ledPortPinPointerArray
// Output - none
// ***********************************************************************
void initializeAllLedPortPin06(portPinArrayPointerArray ledPortPinArrayPointerArray, int maxLedNumber)
{
int ledNumber;
for (ledNumber = 1; ledNumber < (maxLedNumber + 1); ledNumber++) // Caution!!! ledNumber starts 1, not 0 !!!
{
initializeLedPortPin06(ledPortPinArrayPointerArray, ledNumber);
}
}
// ***********************************************************************
// Blink functions
// ***********************************************************************
void blinkLed06(portPinArrayPointerArray portPinArrayPointerArray, deviceNumber ledNumber, int onTime, int offTime, int blinkCount)
{
int count;
int portNumber;
int pinNumber;
GPIO_TypeDef *gpio_struct_ptr;
portNumber = getPortNumber06(portPinArrayPointerArray, ledNumber);
gpio_struct_ptr = getGpioStructPointer(portNumber);
pinNumber = getPinNumber06(portPinArrayPointerArray, ledNumber);
delayMilliSecond(100);
for (count = 0; count < blinkCount; count++)
{
setPortPinData(gpio_struct_ptr, pinNumber, LogicLevelLow);
delayMilliSecond(onTime);
setPortPinData(gpio_struct_ptr, pinNumber, LogicLevelHigh);
delayMilliSecond(offTime);
}
}
void testBlinkLed06(portPinArrayPointerArray portPinArrayPointerArray, int maxLedNumber, int onTime, int offTime, int blinkCount)
{
int i;
initializeAllLedPortPin06(portPinArrayPointerArray, maxLedNumber);
for (i = 1; i < maxLedNumber + 1; i++)
{
blinkLed06(portPinArrayPointerArray, i, onTime, offTime, blinkCount);
}
}
void blinkFongLedList1()
{
testBlinkLed06(*FongLedList1, 5, 100, 200, 2);
}
void blink5Leds()
{
blinkFongLedList1();
}
// ***********************************************************************
// Blink Led using FongBoardStruct - not working !!!
// ***********************************************************************
void testBlinkLed063() // using mcuBoardStruct, not working !!!
{
portPinArrayPointerArray *fongLedPortPinArrayPointerArray;
mcuBoardStruct *FongBoardStruct;
FongBoardStruct->LedPortPinArrayPointerArray = FongLedList1;
FongBoardStruct->KeyPortPinArrayPointerArray = FongKeyList1;
FongBoardStruct->PwmPortPinArrayPointerArray = FongPwmList1;
fongLedPortPinArrayPointerArray = FongBoardStruct->LedPortPinArrayPointerArray;
testBlinkLed06(*fongLedPortPinArrayPointerArray, 4, 100, 200, 3);
}
//blink5Leds();
}
// ***********************************************************************
// ***********************************************************************
// ***********************************************************************
// ***********************************************************************
// ***********************************************************************
void FongBlink011() // 2013aug19hkt0923
{
int i, j;
/* Enable GPIO block clock */
SYSCON_AHBPeriphClockCmd(SYSCON_AHBPeriph_GPIO, ENABLE);
/* PIO0_5 set to PIO function */
IOCON_SetPinFunc(IOCON_PIO0_5, PIO0_5_FUN_PIO); // <<<<<
/* Set PIO0_5 as output. */
GPIO_SetDir(PORT0, GPIO_Pin_5, 1); // <<<<<
while(1) {
/* Delay some time */
for(i=0; i<30; i++) {
for(j=0; j<10000; j++) {
}
}
/* Output high level */
GPIO_SetBits(PORT0, GPIO_Pin_5); // <<<<<
/* Delay some time */
for(i=0; i<30; i++) {
for(j=0; j<10000; j++) {
}
}
/* Output low level */
GPIO_ResetBits(PORT0, GPIO_Pin_5); // <<<<<
}
}
void BlinkExp() // 2013aug18
{
int i, j;
/* Enable GPIO block clock */
SYSCON_AHBPeriphClockCmd(SYSCON_AHBPeriph_GPIO, ENABLE);
/* PIO0_5 set to PIO function */
IOCON_SetPinFunc(IOCON_PIO0_5, PIO0_5_FUN_PIO); // <<<<<
/* Set PIO0_5 as output. */
GPIO_SetDir(PORT0, GPIO_Pin_5, 1); // <<<<<
while(1) {
/* Delay some time */
for(i=0; i<20; i++) {
for(j=0; j<10000; j++) {
}
}
/* Output high level */
GPIO_SetBits(PORT0, GPIO_Pin_5); // <<<<<
/* Delay some time */
for(i=0; i<20; i++) {
for(j=0; j<10000; j++) {
}
}
/* Output low level */
GPIO_ResetBits(PORT0, GPIO_Pin_5); // <<<<<
}
}
GCC HOME: L:\coocox\CoIDE\gcc\GNU Tools ARM Embedded\4.7 2013q2\bin
compile:
[mkdir] Created dir: L:\coocox\program\blinky\FongBlink01\Debug\bin
[mkdir] Created dir: L:\coocox\program\blinky\FongBlink01\Debug\obj
[cc] 13 total files to be compiled.
[cc] arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -Wall -ffunction-sections -g -O0 -c -DLPC1114x301 -IL:\coocox\program\blinky\cmsis_core -IL:\coocox\program -IL:\coocox\program\blinky\LPC111x_Lib -IL:\coocox\program\blinky\LPC111x_Lib\include -IL:\coocox\program\blinky\cmsis_lpc11xx -IL:\coocox\program\blinky L:\coocox\program\blinky\LPC111x_Lib\source\lpc11xx_ssp.c L:\coocox\program\blinky\LPC111x_Lib\source\lpc11xx_i2c.c L:\coocox\program\blinky\LPC111x_Lib\source\lpc11xx_uart.c L:\coocox\program\blinky\cmsis_lpc11xx\system_LPC11xx.c L:\coocox\program\blinky\LPC111x_Lib\source\lpc11xx_tmr.c L:\coocox\program\blinky\main.c L:\coocox\program\blinky\LPC111x_Lib\source\lpc11xx_gpio.c L:\coocox\program\blinky\LPC111x_Lib\source\lpc11xx_syscon.c L:\coocox\program\blinky\LPC111x_Lib\source\lpc11xx_iocon.c L:\coocox\program\blinky\LPC111x_Lib\source\lpc11xx_adc.c L:\coocox\program\blinky\cmsis_lpc11xx\startup\startup_lpc11xx.c L:\coocox\program\blinky\example\Blink.c L:\coocox\program\blinky\cmsis_core\core_cm0.c
[cc] L:\coocox\program\blinky\main.c: In function 'main':
[cc] L:\coocox\program\blinky\main.c:22:1: warning: control reaches end of non-void function [-Wreturn-type]
[cc] L:\coocox\program\blinky\example\Blink.c: In function 'FongBlink013':
[cc] L:\coocox\program\blinky\example\Blink.c:7:2: warning: implicit declaration of function 'FongBlink011' [-Wimplicit-function-declaration]
[cc] L:\coocox\program\blinky\example\Blink.c:169:4: warning: missing braces around initializer [-Wmissing-braces]
[cc] L:\coocox\program\blinky\example\Blink.c: In function 'FongBlink012':
[cc] L:\coocox\program\blinky\example\Blink.c:169:4: warning: (near initialization for 'FongLedList1[0]') [-Wmissing-braces]
[cc] L:\coocox\program\blinky\example\Blink.c:174:3: warning: (near initialization for 'FongKeyList1[0]') [-Wmissing-braces]
[cc] L:\coocox\program\blinky\example\Blink.c:174:3: warning: missing braces around initializer [-Wmissing-braces]
[cc] L:\coocox\program\blinky\example\Blink.c:179:4: warning: missing braces around initializer [-Wmissing-braces]
[cc] L:\coocox\program\blinky\example\Blink.c:179:4: warning: (near initialization for 'FongPwmList1[0]') [-Wmissing-braces]
[cc] L:\coocox\program\blinky\example\Blink.c:256:14: warning: unused variable 'TwentyTimes' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:255:14: warning: unused variable 'TenTimes' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:254:14: warning: unused variable 'EightTimes' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:253:14: warning: unused variable 'SixTimes' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:252:14: warning: unused variable 'FiveTimes' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:251:14: warning: unused variable 'FourTimes' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:250:14: warning: unused variable 'ThreeTimes' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:249:14: warning: unused variable 'TwoTimes' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:248:14: warning: unused variable 'OneTime' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:133:12: warning: unused variable 'MaxFongBoardPwmNumber' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:132:12: warning: unused variable 'MaxFongBoardKeyNumber' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:131:12: warning: unused variable 'MaxFongBoardLedNumber' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:130:12: warning: unused variable 'MaxBoardDeviceNumber' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:122:22: warning: unused variable 'MatchRegister2' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:121:22: warning: unused variable 'MatchRegister1' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:117:14: warning: unused variable 'Ct32b1' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:120:22: warning: unused variable 'MatchRegister0' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:116:14: warning: unused variable 'Ct32b0' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:115:14: warning: unused variable 'Ct16b1' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:114:14: warning: unused variable 'Ct16b0' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:111:20: warning: unused variable 'Pio110' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:109:20: warning: unused variable 'Rpio12' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:108:20: warning: unused variable 'Rpio11' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:110:20: warning: unused variable 'Pio19' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:107:20: warning: unused variable 'Pio09' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:106:20: warning: unused variable 'Pio08' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:99:15: warning: unused variable 'Pwm5' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:98:15: warning: unused variable 'Pwm4' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:97:15: warning: unused variable 'Pwm3' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:96:15: warning: unused variable 'Pwm2' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:95:15: warning: unused variable 'Pwm1' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:92:15: warning: unused variable 'Key4' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:93:15: warning: unused variable 'Key5' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:91:15: warning: unused variable 'Key3' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:90:15: warning: unused variable 'Key2' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:89:15: warning: unused variable 'Key1' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:87:15: warning: unused variable 'Led5' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:86:15: warning: unused variable 'Led4' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:85:15: warning: unused variable 'Led3' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:84:15: warning: unused variable 'Led2' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:83:15: warning: unused variable 'Led1' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:81:15: warning: unused variable 'Device6' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:70:12: warning: unused variable 'Pin11' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:55:13: warning: unused variable 'Port4' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:54:13: warning: unused variable 'Port3' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c:53:13: warning: unused variable 'Port2' [-Wunused-variable]
[cc] L:\coocox\program\blinky\example\Blink.c: At top level:
[cc] L:\coocox\program\blinky\example\Blink.c:579:6: warning: conflicting types for 'FongBlink011' [enabled by default]
[cc] L:\coocox\program\blinky\example\Blink.c:7:2: note: previous implicit declaration of 'FongBlink011' was here
[cc] Starting link
[cc] arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -g -nostartfiles -Wl,-Map=FongBlink01.map -O0 -Wl,--gc-sections -LL:\coocox\CoIDE\configuration\ProgramData\FongBlink01 -Wl,-TL:\coocox\CoIDE\configuration\ProgramData\FongBlink01/arm-gcc-link.ld -g -o FongBlink01.elf ..\obj\lpc11xx_ssp.o ..\obj\lpc11xx_i2c.o ..\obj\lpc11xx_uart.o ..\obj\system_LPC11xx.o ..\obj\lpc11xx_tmr.o ..\obj\main.o ..\obj\lpc11xx_gpio.o ..\obj\lpc11xx_syscon.o ..\obj\lpc11xx_iocon.o ..\obj\lpc11xx_adc.o ..\obj\startup_lpc11xx.o ..\obj\Blink.o ..\obj\core_cm0.o
Program Size:
text data bss dec hex filename
1220 12 1028 2260 8d4 FongBlink01.elf
BUILD SUCCESSFUL
Total time: 6 seconds
.END
No comments:
Post a Comment