DCS_TEAM / Mbed 2 deprecated DCS

Dependencies:   MBed_Adafruit-GPS-Library SDFileSystem mbed GSM_Library

Fork of DCS by Brandon Crofts

Committer:
bjcrofts
Date:
Fri Mar 06 22:36:44 2015 +0000
Revision:
1:8614e190908b
Child:
2:5c0513ab856e
hoy

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bjcrofts 1:8614e190908b 1 #include "GSMLibrary.h"
bjcrofts 1:8614e190908b 2 #include "gsmqueue.h"
bjcrofts 1:8614e190908b 3 #include <string.h>
bjcrofts 1:8614e190908b 4
bjcrofts 1:8614e190908b 5 #define TIME_CONST .3
bjcrofts 1:8614e190908b 6 #define SECONDS_TIMEOUT 40
bjcrofts 1:8614e190908b 7 #define TIMEOUTLIMIT SECONDS_TIMEOUT/TIME_CONST //$change check with main code this will set up condition fior timeout.
bjcrofts 1:8614e190908b 8
bjcrofts 1:8614e190908b 9 //definition for AT comands
bjcrofts 1:8614e190908b 10 #define AT_OK "AT"
bjcrofts 1:8614e190908b 11 #define AT_CSQ "AT+CSQ"
bjcrofts 1:8614e190908b 12 #define AT_CREG "AT+CREG?"
bjcrofts 1:8614e190908b 13 #define AT_CMGF "AT+CMGF=1"
bjcrofts 1:8614e190908b 14 #define RECEIVER_PHONE_NUMBER "\"+18014722842\""
bjcrofts 1:8614e190908b 15 #define AT_CMGS "AT+CMGS=" RECEIVER_PHONE_NUMBER
bjcrofts 1:8614e190908b 16 #define MESSAGE_BODY "stress test\32\32"
bjcrofts 1:8614e190908b 17
bjcrofts 1:8614e190908b 18 //Definition for AT repsonses
bjcrofts 1:8614e190908b 19 //Please notice that after ":" the gsm will usually send aditional information
bjcrofts 1:8614e190908b 20 #define AT_OK_RESPONSE "OK" //Response after sending "AT" message
bjcrofts 1:8614e190908b 21 #define AT_CSQ_RESPONSE "+CSQ:" //+CSQ: <arg1>,<arg2> where <arg1> is signal strength arg1 = 0-30 where a number below 10 means low signal strength and 99 is not knwn or detectable signal and arg2 is bit error rate form 0-7, 99 will represent error
bjcrofts 1:8614e190908b 22 #define AT_CREG_RESPONSE "+CREG:"//+CREG: <arg1>,<arg2> where <arg1> = 0-2(see AT command descriptions), <arg2> = 0-5, 0 not registered to nework and not looking for one. 1 is conected to network, 2 is not conected but searching
bjcrofts 1:8614e190908b 23 #define AT_CMGF_RESPONSE "OK"
bjcrofts 1:8614e190908b 24 #define AT_CMGS_RESPONSE ">" //Message is written aftersymbol
bjcrofts 1:8614e190908b 25 #define AT_SENDSMS_RESPONSE ">" // +CMGS: <id> this will include the message id. CMGS ERROR for error and
bjcrofts 1:8614e190908b 26 #define AT_SUCCESS_REPSONSE "+CMGS:"
bjcrofts 1:8614e190908b 27
bjcrofts 1:8614e190908b 28 //External variables
bjcrofts 1:8614e190908b 29 extern Serial pc;
bjcrofts 1:8614e190908b 30 extern Serial gsm;
bjcrofts 1:8614e190908b 31 extern uint8_t buffer[BUFFER_LENGTH];//buffer storing char
bjcrofts 1:8614e190908b 32
bjcrofts 1:8614e190908b 33 //Internal variables
bjcrofts 1:8614e190908b 34 gsm_states gsm_current_state = GSM_INITIALIZE;
bjcrofts 1:8614e190908b 35 char send = 0;
bjcrofts 1:8614e190908b 36 int timeout_count = 0;
bjcrofts 1:8614e190908b 37
bjcrofts 1:8614e190908b 38 void gsm_tick()
bjcrofts 1:8614e190908b 39 {
bjcrofts 1:8614e190908b 40 if (getGSMIdleBit() || gsm_timeOut() || (send && gsm_current_state == GSM_INITIALIZE)) //question with send...
bjcrofts 1:8614e190908b 41 {
bjcrofts 1:8614e190908b 42 resetGSMIdleBit(); //reset GSM idle bit
bjcrofts 1:8614e190908b 43 gsm_nextStateLogic(); //Next state
bjcrofts 1:8614e190908b 44 gsm_mealyOutputs(); //Mealy outputs
bjcrofts 1:8614e190908b 45 flushQueue(); //Flush the queue
bjcrofts 1:8614e190908b 46 }
bjcrofts 1:8614e190908b 47 }
bjcrofts 1:8614e190908b 48
bjcrofts 1:8614e190908b 49
bjcrofts 1:8614e190908b 50
bjcrofts 1:8614e190908b 51 //Advance timeout counter; if timeout, return true
bjcrofts 1:8614e190908b 52 bool gsm_timeOut()
bjcrofts 1:8614e190908b 53 {
bjcrofts 1:8614e190908b 54 if(++timeout_count >= TIMEOUTLIMIT){
bjcrofts 1:8614e190908b 55 timeout_count=0;
bjcrofts 1:8614e190908b 56 gsm_current_state = GSM_INITIALIZE;
bjcrofts 1:8614e190908b 57 return true;
bjcrofts 1:8614e190908b 58 }
bjcrofts 1:8614e190908b 59 else
bjcrofts 1:8614e190908b 60 return false;
bjcrofts 1:8614e190908b 61 }
bjcrofts 1:8614e190908b 62
bjcrofts 1:8614e190908b 63 //Next state logic -----------------------------------------------------
bjcrofts 1:8614e190908b 64 void gsm_nextStateLogic()
bjcrofts 1:8614e190908b 65 {
bjcrofts 1:8614e190908b 66 printQueue(); //$debug
bjcrofts 1:8614e190908b 67
bjcrofts 1:8614e190908b 68 switch(gsm_current_state)
bjcrofts 1:8614e190908b 69 {
bjcrofts 1:8614e190908b 70 case GSM_INITIALIZE:
bjcrofts 1:8614e190908b 71 pc.printf("gsm_initialize state\r\n");//&debug
bjcrofts 1:8614e190908b 72 timeout_count = 0;
bjcrofts 1:8614e190908b 73 if (send)
bjcrofts 1:8614e190908b 74 gsm_current_state = GSM_AT_OK; //unconditional (check it)
bjcrofts 1:8614e190908b 75 break;
bjcrofts 1:8614e190908b 76 case GSM_AT_OK:
bjcrofts 1:8614e190908b 77 pc.printf("inside AT_OK state\r\n");//&debug
bjcrofts 1:8614e190908b 78 if (findInQueue(AT_OK_RESPONSE))
bjcrofts 1:8614e190908b 79 gsm_current_state = GSM_AT_CSQ;
bjcrofts 1:8614e190908b 80 break;
bjcrofts 1:8614e190908b 81 case GSM_AT_CSQ:
bjcrofts 1:8614e190908b 82 pc.printf("inside AT_CSQ state \r\n");//&debug
bjcrofts 1:8614e190908b 83 if(findInQueue(AT_CSQ_RESPONSE))
bjcrofts 1:8614e190908b 84 gsm_current_state = GSM_AT_CREG;
bjcrofts 1:8614e190908b 85 break;
bjcrofts 1:8614e190908b 86 case GSM_AT_CREG:
bjcrofts 1:8614e190908b 87 pc.printf("gsm_creg state\r\n");//&debug
bjcrofts 1:8614e190908b 88 if(findInQueue(AT_CREG_RESPONSE))
bjcrofts 1:8614e190908b 89 {
bjcrofts 1:8614e190908b 90 pc.printf("creg parse Int1: %d\r\n",parseInt());//&debug
bjcrofts 1:8614e190908b 91 int q = parseInt();
bjcrofts 1:8614e190908b 92 pc.printf("creg parse Int2: %d\r\n",q);//&debug
bjcrofts 1:8614e190908b 93 if(q == 1)
bjcrofts 1:8614e190908b 94 gsm_current_state = GSM_AT_CMGF;
bjcrofts 1:8614e190908b 95 }
bjcrofts 1:8614e190908b 96 break;
bjcrofts 1:8614e190908b 97 case GSM_AT_CMGF:
bjcrofts 1:8614e190908b 98 pc.printf("gsm_cmgf state\r\n");//&debug
bjcrofts 1:8614e190908b 99 if(findInQueue(AT_CMGF_RESPONSE))
bjcrofts 1:8614e190908b 100 gsm_current_state = GSM_AT_CMGS;
bjcrofts 1:8614e190908b 101 break;
bjcrofts 1:8614e190908b 102 case GSM_AT_CMGS:
bjcrofts 1:8614e190908b 103 pc.printf("gsm_cmgs state\r\n");//&debug
bjcrofts 1:8614e190908b 104 if(findInQueue(AT_CMGS_RESPONSE))
bjcrofts 1:8614e190908b 105 gsm_current_state = GSM_AT_SENDSMS;
bjcrofts 1:8614e190908b 106 break;
bjcrofts 1:8614e190908b 107 case GSM_AT_SENDSMS:
bjcrofts 1:8614e190908b 108 pc.printf("gsm_send_sms state\r\n");//&debug
bjcrofts 1:8614e190908b 109 if(findInQueue(AT_SENDSMS_RESPONSE))
bjcrofts 1:8614e190908b 110 gsm_current_state = GSM_SUCCESS;
bjcrofts 1:8614e190908b 111 else
bjcrofts 1:8614e190908b 112 gsm_current_state = GSM_AT_CMGS; //The only spot we can go backwards
bjcrofts 1:8614e190908b 113 break;
bjcrofts 1:8614e190908b 114 case GSM_SUCCESS:
bjcrofts 1:8614e190908b 115 pc.printf("gsm_success state\r\n");//&debug
bjcrofts 1:8614e190908b 116 if(findInQueue(AT_SENDSMS_RESPONSE)) //This appears to be a bug. It was in Danilo's original code as well.
bjcrofts 1:8614e190908b 117 pc.printf("Message SENT! msgID: %iY\r\n",parseInt());//&debug
bjcrofts 1:8614e190908b 118 gsm_current_state = GSM_AT_CMGS; //Confusing part. Do we always go backwards here?
bjcrofts 1:8614e190908b 119 break;
bjcrofts 1:8614e190908b 120 default:
bjcrofts 1:8614e190908b 121 pc.printf("This is a state error");
bjcrofts 1:8614e190908b 122 }
bjcrofts 1:8614e190908b 123 }
bjcrofts 1:8614e190908b 124
bjcrofts 1:8614e190908b 125 //Mealy output logic ------------------------------------------------------
bjcrofts 1:8614e190908b 126 void gsm_mealyOutputs()
bjcrofts 1:8614e190908b 127 {
bjcrofts 1:8614e190908b 128 switch(gsm_current_state)
bjcrofts 1:8614e190908b 129 {
bjcrofts 1:8614e190908b 130 case GSM_INITIALIZE:
bjcrofts 1:8614e190908b 131 pc.printf("No Mealy initialize state output\r\n");//&debug
bjcrofts 1:8614e190908b 132 break;
bjcrofts 1:8614e190908b 133 case GSM_AT_OK:
bjcrofts 1:8614e190908b 134 pc.printf("sending AT_OK\r\n");//&debug
bjcrofts 1:8614e190908b 135 gsm.puts(AT_OK);
bjcrofts 1:8614e190908b 136 gsm.puts("\r\n");
bjcrofts 1:8614e190908b 137 break;
bjcrofts 1:8614e190908b 138 case GSM_AT_CSQ:
bjcrofts 1:8614e190908b 139 pc.printf("sending AT_CSQ\r\n");//&debug
bjcrofts 1:8614e190908b 140 gsm.puts(AT_CSQ);
bjcrofts 1:8614e190908b 141 gsm.puts("\r\n");
bjcrofts 1:8614e190908b 142 break;
bjcrofts 1:8614e190908b 143 case GSM_AT_CREG:
bjcrofts 1:8614e190908b 144 pc.printf("sending AT_CREG\r\n");//&debug
bjcrofts 1:8614e190908b 145 gsm.puts(AT_CREG);
bjcrofts 1:8614e190908b 146 gsm.puts("\r\n");
bjcrofts 1:8614e190908b 147 break;
bjcrofts 1:8614e190908b 148 case GSM_AT_CMGF:
bjcrofts 1:8614e190908b 149 pc.printf("sending AT_CMGF\r\n");//&debug
bjcrofts 1:8614e190908b 150 gsm.puts(AT_CMGF);
bjcrofts 1:8614e190908b 151 gsm.puts("\r\n");
bjcrofts 1:8614e190908b 152 break;
bjcrofts 1:8614e190908b 153 case GSM_AT_CMGS:
bjcrofts 1:8614e190908b 154 pc.printf("sending AT_CMGS\r\n");//&debug
bjcrofts 1:8614e190908b 155 gsm.puts(AT_CMGS);
bjcrofts 1:8614e190908b 156 gsm.puts("\r\n");
bjcrofts 1:8614e190908b 157 break;
bjcrofts 1:8614e190908b 158 case GSM_AT_SENDSMS:
bjcrofts 1:8614e190908b 159 pc.printf("sending MESSAGE_BODY\r\n");//&debug
bjcrofts 1:8614e190908b 160 gsm.puts(MESSAGE_BODY); //substitute char included
bjcrofts 1:8614e190908b 161 gsm.puts("\r\n");
bjcrofts 1:8614e190908b 162 break;
bjcrofts 1:8614e190908b 163 case GSM_SUCCESS:
bjcrofts 1:8614e190908b 164 pc.printf("No Mealy success state output\r\n");//&debug
bjcrofts 1:8614e190908b 165 default:
bjcrofts 1:8614e190908b 166 pc.printf("This is a state error");
bjcrofts 1:8614e190908b 167 }
bjcrofts 1:8614e190908b 168 }
bjcrofts 1:8614e190908b 169
bjcrofts 1:8614e190908b 170 //set send falg on
bjcrofts 1:8614e190908b 171 void gsm_send_sms(){
bjcrofts 1:8614e190908b 172 send = 1;
bjcrofts 1:8614e190908b 173 }
bjcrofts 1:8614e190908b 174
bjcrofts 1:8614e190908b 175 //
bjcrofts 1:8614e190908b 176 void gsm_reset();
bjcrofts 1:8614e190908b 177
bjcrofts 1:8614e190908b 178
bjcrofts 1:8614e190908b 179 //
bjcrofts 1:8614e190908b 180 void gsm_initialize(){
bjcrofts 1:8614e190908b 181 SIM_SCGC6 |= SIM_SCGC6_DMAMUX_MASK; //enabling dmamux clock
bjcrofts 1:8614e190908b 182 SIM_SCGC7 |= SIM_SCGC7_DMA_MASK; // enebaling dma clock
bjcrofts 1:8614e190908b 183 pc.printf("initializing registers...!\r\n");
bjcrofts 1:8614e190908b 184 // control register mux, enabling uart3 receive
bjcrofts 1:8614e190908b 185 DMAMUX_CHCFG0 |= DMAMUX_CHCFG_ENBL_MASK|DMAMUX_CHCFG_SOURCE(8);
bjcrofts 1:8614e190908b 186
bjcrofts 1:8614e190908b 187 // Enable request signal for channel 0
bjcrofts 1:8614e190908b 188 DMA_ERQ = DMA_ERQ_ERQ0_MASK;
bjcrofts 1:8614e190908b 189
bjcrofts 1:8614e190908b 190 // select round-robin arbitration priority
bjcrofts 1:8614e190908b 191 DMA_CR |= DMA_CR_ERCA_MASK;
bjcrofts 1:8614e190908b 192
bjcrofts 1:8614e190908b 193 //enabled error interrupt for DMA0
bjcrofts 1:8614e190908b 194 //DMA_EEI = DMA_EEI_EEI0_MASK ;
bjcrofts 1:8614e190908b 195 //Addres for buffer
bjcrofts 1:8614e190908b 196 DMA_TCD0_SADDR = (uint32_t) &UART_D_REG(UART3_BASE_PTR);
bjcrofts 1:8614e190908b 197 DMA_TCD0_DADDR = (uint32_t) buffer;
bjcrofts 1:8614e190908b 198 // Set an offset for source and destination address
bjcrofts 1:8614e190908b 199 DMA_TCD0_SOFF = 0x00;
bjcrofts 1:8614e190908b 200 DMA_TCD0_DOFF = 0x01; // Destination address offset of 1 byte per transaction
bjcrofts 1:8614e190908b 201
bjcrofts 1:8614e190908b 202 // Set source and destination data transfer size
bjcrofts 1:8614e190908b 203 DMA_TCD0_ATTR = DMA_ATTR_SSIZE(0) | DMA_ATTR_DSIZE(0);
bjcrofts 1:8614e190908b 204
bjcrofts 1:8614e190908b 205 // Number of bytes to be transfered in each service request of the channel
bjcrofts 1:8614e190908b 206 DMA_TCD0_NBYTES_MLNO = 0x01;
bjcrofts 1:8614e190908b 207 // Current major iteration count
bjcrofts 1:8614e190908b 208 DMA_TCD0_CITER_ELINKNO = DMA_CITER_ELINKNO_CITER(BUFFER_LENGTH);
bjcrofts 1:8614e190908b 209 DMA_TCD0_BITER_ELINKNO = DMA_BITER_ELINKNO_BITER(BUFFER_LENGTH);
bjcrofts 1:8614e190908b 210 // Adjustment value used to restore the source and destiny address to the initial value
bjcrofts 1:8614e190908b 211 // After reading 'len' number of times, the DMA goes back to the beginning by subtracting len*2 from the address (going back to the original address)
bjcrofts 1:8614e190908b 212 DMA_TCD0_SLAST = 0; // Source address adjustment
bjcrofts 1:8614e190908b 213 DMA_TCD0_DLASTSGA = -BUFFER_LENGTH; // Destination address adjustment
bjcrofts 1:8614e190908b 214 // Setup control and status register
bjcrofts 1:8614e190908b 215 DMA_TCD0_CSR = 0;
bjcrofts 1:8614e190908b 216
bjcrofts 1:8614e190908b 217 // enable interrupt call at end of major loop
bjcrofts 1:8614e190908b 218 DMA_TCD0_CSR |= DMA_CSR_INTMAJOR_MASK;
bjcrofts 1:8614e190908b 219
bjcrofts 1:8614e190908b 220 //Activate dma trasnfer rx interrupt
bjcrofts 1:8614e190908b 221 UART_C2_REG(UART3) |= UART_C2_RIE_MASK;
bjcrofts 1:8614e190908b 222 UART_C5_REG(UART3) |= UART_C5_RDMAS_MASK | UART_C5_ILDMAS_MASK | UART_C5_LBKDDMAS_MASK;
bjcrofts 1:8614e190908b 223 //activate p fifo
bjcrofts 1:8614e190908b 224 UART_PFIFO_REG(UART3) |= UART_PFIFO_RXFE_MASK; //RXFE and buffer size of 1 word
bjcrofts 1:8614e190908b 225 queueInit();
bjcrofts 1:8614e190908b 226 pc.printf("Initialization done...\n\r");
bjcrofts 1:8614e190908b 227 }
bjcrofts 1:8614e190908b 228
bjcrofts 1:8614e190908b 229
bjcrofts 1:8614e190908b 230
bjcrofts 1:8614e190908b 231 //initialization debuging purposes
bjcrofts 1:8614e190908b 232 void print_registers() {
bjcrofts 1:8614e190908b 233
bjcrofts 1:8614e190908b 234
bjcrofts 1:8614e190908b 235 pc.printf("\n\rDMA REGISTERS\n\r");
bjcrofts 1:8614e190908b 236 pc.printf("DMA_MUX: 0x%08x\r\n",DMAMUX_CHCFG0);
bjcrofts 1:8614e190908b 237 pc.printf("SADDR0: 0x%08x\r\n",DMA_TCD0_SADDR);
bjcrofts 1:8614e190908b 238 pc.printf("DADDR0: 0x%08x\r\n",DMA_TCD0_DADDR);
bjcrofts 1:8614e190908b 239 pc.printf("CITER0: 0x%08x\r\n",DMA_TCD0_CITER_ELINKNO);
bjcrofts 1:8614e190908b 240 pc.printf("BITER0: 0x%08x\r\n",DMA_TCD0_BITER_ELINKNO);
bjcrofts 1:8614e190908b 241 pc.printf("DMA_CR: %08x\r\n", DMA_CR);
bjcrofts 1:8614e190908b 242 pc.printf("DMA_ES: %08x\r\n", DMA_ES);
bjcrofts 1:8614e190908b 243 pc.printf("DMA_ERQ: %08x\r\n", DMA_ERQ);
bjcrofts 1:8614e190908b 244 pc.printf("DMA_EEI: %08x\r\n", DMA_EEI);
bjcrofts 1:8614e190908b 245 pc.printf("DMA_CEEI: %02x\r\n", DMA_CEEI);
bjcrofts 1:8614e190908b 246 pc.printf("DMA_SEEI: %02x\r\n", DMA_SEEI);
bjcrofts 1:8614e190908b 247 pc.printf("DMA_CERQ: %02x\r\n", DMA_CERQ);
bjcrofts 1:8614e190908b 248 pc.printf("DMA_SERQ: %02x\r\n", DMA_SERQ);
bjcrofts 1:8614e190908b 249 pc.printf("DMA_CDNE: %02x\r\n", DMA_CDNE);
bjcrofts 1:8614e190908b 250 pc.printf("DMA_SSRT: %02x\r\n", DMA_SSRT);
bjcrofts 1:8614e190908b 251 pc.printf("DMA_CERR: %02x\r\n", DMA_CERR);
bjcrofts 1:8614e190908b 252 pc.printf("DMA_CINT: %02x\r\n", DMA_CINT);
bjcrofts 1:8614e190908b 253 pc.printf("DMA_INT: %08x\r\n", DMA_INT);
bjcrofts 1:8614e190908b 254 pc.printf("DMA_ERR: %08x\r\n", DMA_ERR);
bjcrofts 1:8614e190908b 255 pc.printf("DMA_HRS: %08x\r\n", DMA_HRS);
bjcrofts 1:8614e190908b 256 pc.printf("DMA_TCD0_DOFF: %08x\r\n",DMA_TCD0_DOFF);
bjcrofts 1:8614e190908b 257 pc.printf("\n\rUART REGISTERS\n\r");
bjcrofts 1:8614e190908b 258 pc.printf("UART_BDH_REG: %08x\r\n",UART_BDH_REG(UART3));
bjcrofts 1:8614e190908b 259 pc.printf("UART_C1_REG: %08x\r\n",UART_C1_REG(UART3));
bjcrofts 1:8614e190908b 260 pc.printf("UART_C2_REG: %08x\r\n",UART_C2_REG(UART3));
bjcrofts 1:8614e190908b 261 pc.printf("UART_S1_REG: %08x\r\n",UART_S1_REG(UART3));
bjcrofts 1:8614e190908b 262 pc.printf("UART_s2_REG: %08x\r\n",UART_S2_REG(UART3));
bjcrofts 1:8614e190908b 263 pc.printf("UART_C3_REG: %08x\r\n",UART_C3_REG(UART3));
bjcrofts 1:8614e190908b 264 pc.printf("UART_D_REG: %08x\r\n",UART_D_REG(UART3));
bjcrofts 1:8614e190908b 265 pc.printf("UART_MA1_REG: %08x\r\n",UART_MA1_REG(UART3));
bjcrofts 1:8614e190908b 266 pc.printf("UART_MA2_REG: %08x\r\n",UART_MA2_REG(UART3));
bjcrofts 1:8614e190908b 267 pc.printf("UART_C4_REG: %08x\r\n",UART_C4_REG(UART3));
bjcrofts 1:8614e190908b 268 pc.printf("UART_C5_REG: %08x\r\n",UART_C5_REG(UART3));
bjcrofts 1:8614e190908b 269 pc.printf("UART_ED_REG: %08x\r\n",UART_ED_REG(UART3));
bjcrofts 1:8614e190908b 270 pc.printf("UART_MODEM_REG: %08x\r\n",UART_MODEM_REG(UART3));
bjcrofts 1:8614e190908b 271 pc.printf("UART_IR_REG: %08x\r\n",UART_IR_REG(UART3));
bjcrofts 1:8614e190908b 272 pc.printf("UART_PFIFO_REG: %08x\r\n",UART_PFIFO_REG(UART3));
bjcrofts 1:8614e190908b 273 pc.printf("UART_CFIFO_REG: %08x\r\n",UART_CFIFO_REG(UART3));
bjcrofts 1:8614e190908b 274 pc.printf("UART_SFIFO_REG: %08x\r\n",UART_SFIFO_REG(UART3));
bjcrofts 1:8614e190908b 275 pc.printf("UART_TWFIFO_REG: %08x\r\n",UART_TWFIFO_REG(UART3));
bjcrofts 1:8614e190908b 276 pc.printf("UART_TCFIFO_REG: %08x\r\n",UART_TCFIFO_REG(UART3));
bjcrofts 1:8614e190908b 277 pc.printf("UART_RWFIFO_REG: %08x\r\n",UART_RWFIFO_REG(UART3));
bjcrofts 1:8614e190908b 278 pc.printf("UART_RCFIFO_REG: %08x\r\n",UART_RCFIFO_REG(UART3));
bjcrofts 1:8614e190908b 279
bjcrofts 1:8614e190908b 280 }