lpcmanager

fixed build warnings in SPI_init

2015-06-15, Edouard Tisserant
46839ad22942
Parents 8bb24e830620
Children bf4901ab3a96
fixed build warnings in SPI_init
added new cases in Devices bus
--- a/LPCBus/MC9_Devices_decl.c Sat Mar 14 20:19:18 2015 +0100
+++ b/LPCBus/MC9_Devices_decl.c Mon Jun 15 15:04:14 2015 +0200
@@ -208,7 +208,7 @@
#define LOCKED 1
#define FULL 2
-#define MAX_UART_DEVICES 52
+#define MAX_UART_DEVICES 68
/* UART bus read and write buffer size */
#define UART_BUFSIZE 48
@@ -505,14 +505,42 @@
case(76):
case(78):
case(80):
+ case(82): /* MU4 */
+ case(84):
+ case(86):
+ case(88):
+ case(90): /* MU5 */
+ case(92):
+ case(94):
+ case(96):
+ case(98): /* MU6 */
+ case(100):
+ case(102):
+ case(104):
+ case(106): /* M4U */
+ case(108):
+ case(110):
+ case(112):
+ case(114): /* TH1 */
+ case(116):
+ case(118):
+ case(120):
+ case(122):
+ case(124):
+ case(126):
+ case(128):
+ case(130):
+ case(132):
+ case(134):
+ case(136):
uartPortDevices[i] = &UARTDevice;
uartPortTim[i].toValue = msTOns(50); /* 50ms */
uartPortTim[i].status = TIM_EN_RUNNING;
break;
- case(130): /* P01, P02, P01V, P02V */
- case(132):
- case(134):
- case(136):
+// case(130): /* P01, P02, P01V, P02V */
+// case(132):
+// case(134):
+// case(136):
case(138): /* CA1 */
case(140):
case(142):
--- a/MC9target/plc_MC9_main_retain.c Sat Mar 14 20:19:18 2015 +0100
+++ b/MC9target/plc_MC9_main_retain.c Mon Jun 15 15:04:14 2015 +0200
@@ -109,11 +109,9 @@
}
/* Bus configuration */
- printf("Configure the bus :\n");
/* Clock phase */
uint = TEST_SPI_CLK_PHASE;
- printf("> (SET) Clock phase : %d \n", uint);
if (rt_dev_ioctl(fd_spi, RTDM_SPI_CLKPHASE_SET, &uint) < 0) {
printf("Failed to configure the clock phase\n");
return;
@@ -122,11 +120,9 @@
printf("Failed to get the clock phase\n");
return;
}
- printf("> (GET) Clock phase : %d \n", uint);
/* Clock polarity */
uint = TEST_SPI_CLK_POLARITY;
- printf("> (SET) Clock polarity : %d \n", uint);
if (rt_dev_ioctl(fd_spi, RTDM_SPI_CLKPOLARITY_SET, &uint) < 0) {
printf("Failed to configure the clock polarity\n");
return;
@@ -135,11 +131,9 @@
printf("Failed to get the clock polarity\n");
return;
}
- printf("> (GET) Clock polarity : %d \n", uint);
/* Frequency */
ulong = TEST_SPI_SPEED;
- printf("> (SET) Frequency : %d \n", ulong);
if (rt_dev_ioctl(fd_spi, RTDM_SPI_FREQ_SET, &ulong) < 0) {
printf("Failed to configure the frequency\n");
return;
@@ -148,11 +142,9 @@
printf("Failed to get the frequency\n");
return;
}
- printf("> (GET) Frequency : %lu \n", ulong);
/* Bits per word */
uint = TEST_SPI_BITS_PER_WORD;
- printf("> (SET) Bits per word : %d \n", uint);
if (rt_dev_ioctl(fd_spi, RTDM_SPI_BITSPERWORD_SET, &uint) < 0) {
printf("Failed to configure the BPW\n");
return;
@@ -161,11 +153,9 @@
printf("Failed to get the BPW\n");
return;
}
- printf("> (GET) Bits per word : %d \n", uint);
/* Chipselect */
uint = TEST_SPI_CHIPSELECT1;
- printf("> (SET) Chip select : %d \n", uint);
if (rt_dev_ioctl(fd_spi, RTDM_SPI_CHIPSELECT_SET, &uint) < 0) {
printf("Failed to configure the chip select\n");
return;
@@ -174,11 +164,9 @@
printf("Failed to get the chip select\n");
return;
}
- printf("> (GET) Chip select : %d \n", uint);
/* DMA usage definition */
uint = TEST_SPI_DMA_BYTES_MIN;
- printf("> (SET) Use the DMA from %d bytes\n", uint);
if (rt_dev_ioctl(fd_spi, RTDM_SPI_DMA_SET, &uint) < 0) {
printf("Failed to configure the DMA threshold\n");
return;
@@ -187,8 +175,6 @@
printf("Failed to get the DMA threshold\n");
return;
}
- printf("> (GET) DMA threshold : %d bytes \n", uint);
-
/* Prepare for future write commands */
/* Write Command*/