123

Dependencies:   mbed

Fork of LG by igor Apu

Revision:
173:7f938afb0447
Parent:
167:bedc0a9d559a
--- a/DeviceSSP.c	Fri Jun 17 13:54:50 2016 +0000
+++ b/DeviceSSP.c	Sun Jun 19 03:54:35 2016 +0000
@@ -63,13 +63,12 @@
     Dummy = LPC_SSP1->DR;   /* clear the RxFIFO */
 }
 
-void DeviceSSPReceive(void){
+void sspReceive(void){
   //Prepare ADCs for sampling
   LPC_GPIO0->FIOCLR = 1<<16; //reset SSEL signal for ADCs
   //Start ADCs sampling
   LPC_GPIO0->FIOSET = 1<<16; //set SSEL signal for ADCs
   //Get samples
-  uint32_t value;
   
   device.controller.SSP.in[4] += LPC_SSP0->DR;
   device.controller.SSP.in[3] += LPC_SSP0->DR;
@@ -86,6 +85,7 @@
   */
   
   //Clear input queue
+  uint32_t value;
   while (LPC_SSP0->SR & 0x00000004) value = LPC_SSP0->DR;
   /*
   //Average samples for dither period
@@ -98,7 +98,7 @@
   */
 }
 
-void DeviceSSPTransmit(uint8_t index){
+void sspTransmit(uint8_t index){
   LPC_GPIO0->FIOSET = 1<<23; //set SSEL signal for DACs
   LPC_GPIO0->FIOCLR = 1<<23; //reset SSEL signal for DACs