summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/lpc17xx/Drivers/source/lpc17xx_can.c4
-rw-r--r--arch/arm/lpc17xx/Drivers/source/lpc17xx_i2c.c4
-rw-r--r--arch/arm/lpc17xx/Drivers/source/lpc17xx_i2s.c2
-rw-r--r--arch/arm/lpc17xx/Drivers/source/lpc17xx_spi.c10
-rw-r--r--arch/arm/lpc17xx/Drivers/source/lpc17xx_ssp.c8
-rw-r--r--arch/arm/lpc17xx/Drivers/source/lpc17xx_timer.c2
-rw-r--r--arch/arm/lpc17xx/Drivers/source/lpc17xx_uart.c6
7 files changed, 18 insertions, 18 deletions
diff --git a/arch/arm/lpc17xx/Drivers/source/lpc17xx_can.c b/arch/arm/lpc17xx/Drivers/source/lpc17xx_can.c
index eef871f..18cdce2 100644
--- a/arch/arm/lpc17xx/Drivers/source/lpc17xx_can.c
+++ b/arch/arm/lpc17xx/Drivers/source/lpc17xx_can.c
@@ -73,9 +73,9 @@ static void can_SetBaudrate (LPC_CAN_TypeDef *CANx, uint32_t baudrate);
static void can_SetBaudrate (LPC_CAN_TypeDef *CANx, uint32_t baudrate)
{
uint32_t result = 0;
- uint8_t NT, TSEG1, TSEG2;
+ uint8_t NT, TSEG1 = 0, TSEG2 = 0;
uint32_t CANPclk = 0;
- uint32_t BRP;
+ uint32_t BRP = 0;
CHECK_PARAM(PARAM_CANx(CANx));
if (CANx == LPC_CAN1)
diff --git a/arch/arm/lpc17xx/Drivers/source/lpc17xx_i2c.c b/arch/arm/lpc17xx/Drivers/source/lpc17xx_i2c.c
index 9b54228..c130ce1 100644
--- a/arch/arm/lpc17xx/Drivers/source/lpc17xx_i2c.c
+++ b/arch/arm/lpc17xx/Drivers/source/lpc17xx_i2c.c
@@ -211,7 +211,7 @@ static uint32_t I2C_GetByte (LPC_I2C_TypeDef *I2Cx, uint8_t *retdat, Bool ack)
***********************************************************************/
static void I2C_SetClock (LPC_I2C_TypeDef *I2Cx, uint32_t target_clock)
{
- uint32_t temp;
+ uint32_t temp = 0;
CHECK_PARAM(PARAM_I2Cx(I2Cx));
@@ -985,7 +985,7 @@ Status I2C_SlaveTransferData(LPC_I2C_TypeDef *I2Cx, I2C_S_SETUP_Type *TransferCf
{
uint8_t *txdat;
uint8_t *rxdat;
- uint32_t CodeStatus;
+ uint32_t CodeStatus = 0;
uint32_t timeout;
int32_t time_en;
int32_t tmp;
diff --git a/arch/arm/lpc17xx/Drivers/source/lpc17xx_i2s.c b/arch/arm/lpc17xx/Drivers/source/lpc17xx_i2s.c
index e151edb..085e963 100644
--- a/arch/arm/lpc17xx/Drivers/source/lpc17xx_i2s.c
+++ b/arch/arm/lpc17xx/Drivers/source/lpc17xx_i2s.c
@@ -323,7 +323,7 @@ Status I2S_FreqConfig(LPC_I2S_TypeDef *I2Sx, uint32_t Freq, uint8_t TRMode) {
uint32_t x, y;
uint16_t dif;
uint16_t error;
- uint8_t x_divide, y_divide;
+ uint8_t x_divide = 0, y_divide = 0;
uint16_t ErrorOptimal = 0xFFFF;
CHECK_PARAM(PARAM_I2Sx(I2Sx));
diff --git a/arch/arm/lpc17xx/Drivers/source/lpc17xx_spi.c b/arch/arm/lpc17xx/Drivers/source/lpc17xx_spi.c
index 7643de7..77a0e51 100644
--- a/arch/arm/lpc17xx/Drivers/source/lpc17xx_spi.c
+++ b/arch/arm/lpc17xx/Drivers/source/lpc17xx_spi.c
@@ -215,11 +215,11 @@ uint16_t SPI_ReceiveData(LPC_SPI_TypeDef* SPIx)
int32_t SPI_ReadWrite (LPC_SPI_TypeDef *SPIx, SPI_DATA_SETUP_Type *dataCfg, \
SPI_TRANSFER_Type xfType)
{
- uint8_t *rdata8;
- uint8_t *wdata8;
- uint16_t *rdata16;
- uint16_t *wdata16;
- uint32_t stat;
+ uint8_t *rdata8 = NULL;
+ uint8_t *wdata8 = NULL;
+ uint16_t *rdata16 = NULL;
+ uint16_t *wdata16 = NULL;
+ uint32_t stat = 0;
uint32_t temp;
uint8_t dataword;
diff --git a/arch/arm/lpc17xx/Drivers/source/lpc17xx_ssp.c b/arch/arm/lpc17xx/Drivers/source/lpc17xx_ssp.c
index bbf03a6..7d6bb1d 100644
--- a/arch/arm/lpc17xx/Drivers/source/lpc17xx_ssp.c
+++ b/arch/arm/lpc17xx/Drivers/source/lpc17xx_ssp.c
@@ -339,10 +339,10 @@ uint16_t SSP_ReceiveData(LPC_SSP_TypeDef* SSPx)
int32_t SSP_ReadWrite (LPC_SSP_TypeDef *SSPx, SSP_DATA_SETUP_Type *dataCfg, \
SSP_TRANSFER_Type xfType)
{
- uint8_t *rdata8;
- uint8_t *wdata8;
- uint16_t *rdata16;
- uint16_t *wdata16;
+ uint8_t *rdata8 = 0;
+ uint8_t *wdata8 = 0;
+ uint16_t *rdata16 = 0;
+ uint16_t *wdata16 = 0;
uint32_t stat;
uint32_t tmp;
int32_t dataword;
diff --git a/arch/arm/lpc17xx/Drivers/source/lpc17xx_timer.c b/arch/arm/lpc17xx/Drivers/source/lpc17xx_timer.c
index 163cccd..8f8dc79 100644
--- a/arch/arm/lpc17xx/Drivers/source/lpc17xx_timer.c
+++ b/arch/arm/lpc17xx/Drivers/source/lpc17xx_timer.c
@@ -53,7 +53,7 @@ static uint32_t converPtrToTimeNum (LPC_TIM_TypeDef *TIMx);
**********************************************************************/
static uint32_t getPClock (uint32_t timernum)
{
- uint32_t clkdlycnt;
+ uint32_t clkdlycnt = 0;
switch (timernum)
{
case 0:
diff --git a/arch/arm/lpc17xx/Drivers/source/lpc17xx_uart.c b/arch/arm/lpc17xx/Drivers/source/lpc17xx_uart.c
index 5f4ee0c..da01cde 100644
--- a/arch/arm/lpc17xx/Drivers/source/lpc17xx_uart.c
+++ b/arch/arm/lpc17xx/Drivers/source/lpc17xx_uart.c
@@ -60,7 +60,7 @@ static Status uart_set_divisors(LPC_UART_TypeDef *UARTx, uint32_t baudrate)
{
Status errorStatus = ERROR;
- uint32_t uClk;
+ uint32_t uClk = 0;
uint32_t calcBaudrate = 0;
uint32_t temp = 0;
@@ -668,7 +668,7 @@ void UART_ForceBreak(LPC_UART_TypeDef* UARTx)
*********************************************************************/
void UART_IntConfig(LPC_UART_TypeDef *UARTx, UART_INT_Type UARTIntCfg, FunctionalState NewState)
{
- uint32_t tmp;
+ uint32_t tmp = 0;
CHECK_PARAM(PARAM_UARTx(UARTx));
CHECK_PARAM(PARAM_FUNCTIONALSTATE(NewState));
@@ -1158,7 +1158,7 @@ void UART_FullModemForcePinState(LPC_UART1_TypeDef *UARTx, UART_MODEM_PIN_Type P
void UART_FullModemConfigMode(LPC_UART1_TypeDef *UARTx, UART_MODEM_MODE_Type Mode, \
FunctionalState NewState)
{
- uint8_t tmp;
+ uint8_t tmp = 0;
CHECK_PARAM(PARAM_UART1_MODEM(UARTx));
CHECK_PARAM(PARAM_UART1_MODEM_MODE(Mode));