UoS³ Flight Computer Firmware
 All Data Structures Files Functions Groups Pages
txrx-uart.c
1 /* firmware.h contains all relevant headers */
2 #include "../firmware.h"
3 #include "txrx-uart.h"
4 
5 #include "driverlib/interrupt.h"
6 #include "driverlib/systick.h"
7 #include "driverlib/sysctl.h"
8 
9 #include <stdlib.h>
10 #include <stdio.h>
11 #include <string.h>
12 
13 /* A very simple example that blinks the on-board LED. */
14 
15 //#define UART UART_GNSS
16 #define UART UART_CAMERA
17 
18 void cw_tone_option(void);
19 void tx_packets_option(void);
20 uint8_t ui_set_sym_dev(uint8_t radio_id);
21 uint8_t ui_set_freq_power(uint8_t radio_id);
22 uint8_t ui_set_power(uint8_t radio_id);
23 uint8_t ui_set_freq(uint8_t radio_id);
24 uint8_t ui_set_rxbw(uint8_t radio_id);
25 char wait_for_response_char(void);
26 char peek_for_response_char(void);
27 void rx_packets_option(void);
28 uint32_t ui_set_packet_len(uint32_t max_len, uint32_t min_len);
29 uint16_t ui_get_packet_wait(void);
30 void tx_packets_pwrsweep_option(void);
31 void rx_packets_stats_option(void);
32 
33 uint16_t wait_for_response_ln(void);
34 double current_pwr = -500;
35 uint8_t current_pwr_reg = 0;
36 double current_freq = 0;
37 
38 #define UART_BUFF_LEN 100
39 char uart_in_buff[UART_BUFF_LEN] = {0};
40 char uart_out_buff[UART_BUFF_LEN] = {0};
41 
42 
43 //void SysTickIntHandler(void)
44 //{
45 // WDT_kick();
46 //}
47 
48 
49 int main(void)
50 {
51  Board_init();
52  WDT_kick();
53 
54  //SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ);
55  //IntMasterEnable();
56  //SysTickIntEnable();
57  //SysTickEnable();
58 
59 
60  UART_init(UART, 500000);
61 
62  while(1){
63 
64  UART_puts(UART, "Welcome to the radio test program\n\n");
65  UART_puts(UART, "1) CW tone\n");
66  UART_puts(UART, "2) TX FSK packets\n");
67  UART_puts(UART, "3) TX FSK packets (power sweep)\n");
68  UART_puts(UART, "4) RX FSK packets (stats only)\n");
69  UART_puts(UART, "5) RX FSK packets (logtail)\n");
70 
71  WDT_kick();
72 
73  char res = wait_for_response_char();
74 
75  UART_putc(UART, res);
76  UART_putc(UART, '\n');
77 
78  switch (res){
79  case '1':
80  cw_tone_option();
81  break;
82  case '2':
83  tx_packets_option();
84  break;
85  case '3':
86  tx_packets_pwrsweep_option();
87  break;
88  case '4':
89  rx_packets_stats_option();
90  break;
91  case '5':
92  rx_packets_option();
93  break;
94  default:
95  break;
96  }
97 
98  UART_puts(UART, "Next...\n");
99 
100  }
101 
103  //while(1){};
104 
105 }
106 
107 char peek_for_response_char(void){
108 
109  if(!(UART_charsAvail(UART) == 0))
110  return UART_getc(UART);
111  else
112  return 0;
113 }
114 
115 char wait_for_response_char(void){
116 
117  while(UART_charsAvail(UART) == 0){};
118 
119  return UART_getc(UART);
120 }
121 
122 uint16_t wait_for_response_ln(void){
123 
124  uint16_t p = 0;
125  uint8_t ln = 0;
126 
127  while((p < (UART_BUFF_LEN-1)) && (ln == 0)){
128  while(UART_charsAvail(UART) == 0){};
129  uart_in_buff[p] = UART_getc(UART);
130  if ((uart_in_buff[p] == '\n') || (uart_in_buff[p] == '\r'))
131  ln = 1;
132  else
133  p++;
134  }
135  uart_in_buff[p] = '\0';
136  return p;
137 }
138 
139 uint8_t ui_set_sym_dev(uint8_t radio_id){
140  uint32_t symrate, deviation;
141  uint8_t r;
142 
143 
144 
145  UART_puts(UART, "Enter symbol rate (/sec, default: 1000 /sec): ");
146  wait_for_response_ln();
147  symrate = (uint32_t)atoi(uart_in_buff);
148 
149  if (symrate == 0)
150  symrate = 1000;
151 
152  UART_puts(UART, "\nEnter deviation (Hz, default: 2000 Hz): ");
153  wait_for_response_ln();
154  deviation = (uint32_t)atoi(uart_in_buff);
155 
156  if (deviation == 0)
157  deviation = 2000;
158 
159  r = radio_set_fsk_param(radio_id, &symrate, &deviation);
160  snprintf(uart_out_buff, UART_BUFF_LEN, "%li, %li\n", symrate, deviation);
161  if (r){
162  UART_puts(UART, "\nError in symbol rate, deviation settings entered: ");
163  UART_puts(UART, uart_out_buff);
164  return 1;
165  }
166  UART_puts(UART, "\nSetting symbol rate, deviation settings to ");
167  UART_puts(UART, uart_out_buff);
168 
169  return 0;
170 }
171 
172 uint8_t ui_set_freq_power(uint8_t radio_id){
173 
174  if(ui_set_freq(radio_id))
175  return 1;
176 
177  if(ui_set_power(radio_id))
178  return 1;
179 
180  return 0;
181 }
182 uint8_t ui_set_power(uint8_t radio_id){
183  double pwr;
184  uint8_t r;
185  uint8_t pwr_reg=0;
186 
187  UART_puts(UART, "Enter power (dBm): ");
188 
189  //res = wait_for_response_ln();
190  wait_for_response_ln();
191  pwr = atof(uart_in_buff);
192  r = radio_set_pwr_f(radio_id, &pwr, &pwr_reg);
193  snprintf(uart_out_buff, UART_BUFF_LEN, "%2.1f dBm (reg = %i)\n", pwr, pwr_reg);
194  if (r){
195  UART_puts(UART, "Error in power entered: ");
196  UART_puts(UART, uart_out_buff);
197  return 1;
198  }
199  UART_puts(UART, "Setting power to ");
200  UART_puts(UART, uart_out_buff);
201  current_pwr = pwr;
202  current_pwr_reg = pwr_reg;
203  return 0;
204 }
205 uint8_t ui_set_freq(uint8_t radio_id){
206  double freq;
207  uint8_t r;
208 
209 
210  UART_puts(UART, "Enter frequency (MHz): ");
211  //uint16_t res = wait_for_response_ln();
212  wait_for_response_ln();
213  freq = atof(uart_in_buff);
214  r = radio_set_freq_f(radio_id, &freq);
215  snprintf(uart_out_buff, UART_BUFF_LEN, "%3.3f MHz\n", freq);
216  if (r){
217  UART_puts(UART, "Error in frequency entered: ");
218  UART_puts(UART, uart_out_buff);
219  return 1;
220  }
221  current_freq = freq;
222  UART_puts(UART, "Setting frequency to ");
223  UART_puts(UART, uart_out_buff);
224 
225 
226  return 0;
227 }
228 
229 uint32_t ui_set_packet_len(uint32_t max_len, uint32_t min_len){
230  UART_puts(UART, "\nEnter packet length (default: 20 bytes): ");
231  wait_for_response_ln();
232  int32_t len = atoi(uart_in_buff);
233  if (len == 0)
234  len = 20;
235  snprintf(uart_out_buff, UART_BUFF_LEN, "%li bytes\n", len);
236  if ((len > (int32_t)max_len) || (len < (int32_t)min_len)){
237  UART_puts(UART, "Error in length entered: ");
238  UART_puts(UART, uart_out_buff);
239  return 0;
240  }
241  UART_puts(UART, "Setting packet length to ");
242  UART_puts(UART, uart_out_buff);
243  return (uint32_t)len;
244 }
245 
246 uint16_t ui_get_packet_wait(void){
247  UART_puts(UART, "\nEnter packet wait period (default: 300 ms): ");
248  wait_for_response_ln();
249  int32_t p = atoi(uart_in_buff);
250  if (p <= 0)
251  p = 300;
252  snprintf(uart_out_buff, UART_BUFF_LEN, "%li ms\n", p);
253  UART_puts(UART, "Setting packet wait period to ");
254  UART_puts(UART, uart_out_buff);
255  return (uint16_t)p;
256 }
257 
258 uint8_t ui_set_rxbw(uint8_t radio_id){
259 
260  uint32_t rxbw;
261  uint8_t r;
262 
263  UART_puts(UART, "Enter RX bandwidth (Hz, default: 8000 Hz): ");
264  wait_for_response_ln();
265  rxbw = (uint32_t)atoi(uart_in_buff);
266  if (rxbw == 0)
267  rxbw = 8000;
268 
269  r = radio_set_rxbw_param(radio_id, &rxbw); //, &symrate);
270  snprintf(uart_out_buff, UART_BUFF_LEN, "%li\n", rxbw);
271  if (r){
272  UART_puts(UART, "\nError in RX bandwidth entered: ");
273  UART_puts(UART, uart_out_buff);
274  return 1;
275  }
276  UART_puts(UART, "\nSetting RX bandwidth to ");
277  UART_puts(UART, uart_out_buff);
278 
279  return 0;
280 }
281 
282 void rx_packets_stats_option(void){
283 
284  UART_puts(UART, "\nRX FSK packets stats selected\n");
285 
286  radio_reset_config(SPI_RADIO_RX, preferredSettings_fsk, sizeof(preferredSettings_fsk)/sizeof(registerSetting_t));
287 
288  if (ui_set_freq(SPI_RADIO_RX))
289  return;
290 
291  if (ui_set_sym_dev(SPI_RADIO_RX))
292  return;
293 
294 
295  if (ui_set_rxbw(SPI_RADIO_RX))
296  return;
297 
298  manualCalibration(SPI_RADIO_RX);
299 
300  uint8_t num_bytes, marcState;
301  uint8_t rxBuff[256]; // can only read the 128 FIFO bytes for now though
302 
303  SPI_cmd(SPI_RADIO_RX, CC112X_SRX);
304 
305  #define CONFIG_CNT 200
306  uint16_t config_list[CONFIG_CNT] = {0xFFFF};
307  uint32_t last_id_list[CONFIG_CNT] = {0};
308  uint32_t err_cnt_list[CONFIG_CNT] = {0};
309  uint32_t suc_cnt_list[CONFIG_CNT] = {0};
310  uint16_t list_top = 0;
311  uint32_t lowest_id = 0xFFFFFFFF;
312  uint8_t restart = 0;
313  char c;
314 
315  while(1){
316 
317  //wait for packet
318  while(cc1125_pollGPIO(GPIO0_RADIO_RX) == 0){
319  c = peek_for_response_char();
320  if (c == 'r')
321  restart = 1;
322  if (c == 'q')
323  return;
324  }
325  while(cc1125_pollGPIO(GPIO0_RADIO_RX) > 0){
326  c = peek_for_response_char();
327  if (c == 'r')
328  restart = 1;
329  if (c == 'q')
330  return;
331  }
332 
333  if (restart){
334  restart = 0;
335  lowest_id = 0xFFFFFFFF;
336  list_top = 0;
337  }
338 
339 
340 
341 
342  //move to the cc1125 file
343 
344  // see how long the packet is
345  cc112xSpiReadReg(SPI_RADIO_RX, CC112X_NUM_RXBYTES, &num_bytes);
346  if(num_bytes) {
347 
348  // Read MARCSTATE to check for RX FIFO error
349  cc112xSpiReadReg(SPI_RADIO_RX, CC112X_MARCSTATE, &marcState);
350  if((marcState & 0x1F) == 0x11) { // == RX_FIFO_ERROR?
351  UART_puts(UART, "\nError, FIFO error... :/\n");
352  // Flush RX FIFO
353  SPI_cmd(SPI_RADIO_RX, CC112X_SFRX);
354  } else {
355 
356 
357  cc112xSpiReadRxFifo(SPI_RADIO_RX, rxBuff, num_bytes);
358 
359  if (num_bytes > 6){
360 
361  uint8_t crc;
362  uint16_t cfg;
363  uint32_t packetid;
364 
365  packetid = (uint32_t)(rxBuff[2] | (rxBuff[3] << 8) | (rxBuff[4] << 16) | (rxBuff[5] << 24));
366  cfg = rxBuff[1];
367  crc = rxBuff[num_bytes - 1] & 0x80;
368  if (crc){
369 
370  if (lowest_id == 0xFFFFFFFF)
371  lowest_id = packetid;
372 
373  // search to see if we've already stored this cfg
374  uint16_t i;
375  uint8_t found = 0;
376  for (i = 0; i < list_top; i++){
377  if (config_list[i] == cfg){
378  found = 1;
379  break;
380  }
381  }
382  if (found == 0){
383  if (!(list_top >= CONFIG_CNT)){
384  i = list_top;
385  list_top++;
386  config_list[i] = cfg;
387  last_id_list[i] = lowest_id;
388  err_cnt_list[i] = 0;
389  suc_cnt_list[i] = 0;
390  found = 1;
391  }
392  }
393 
394  // update cfg
395  if (found && (packetid > lowest_id)){
396  uint32_t missing = packetid - last_id_list[i] - 1;
397  last_id_list[i] = packetid;
398  err_cnt_list[i] += missing;
399  if (crc)
400  suc_cnt_list[i] += 1;
401  else
402  err_cnt_list[i] += 1;
403  snprintf(uart_out_buff, UART_BUFF_LEN, "id: %li, cfg: %i, crc?: %i ", packetid,cfg,crc);
404  UART_puts(UART, uart_out_buff);
405  snprintf(uart_out_buff, UART_BUFF_LEN, "tot pass: %li, tot fail: %li\n", suc_cnt_list[i], err_cnt_list[i]);
406  UART_puts(UART, uart_out_buff);
407  }
408  }
409  }
410  }
411  }
412  else
413  UART_puts(UART, "\nError, Pin asserted, but no bytes in FIFO! :/\n");
414 
415  SPI_cmd(SPI_RADIO_RX, CC112X_SRX);
416 
417  }
418 }
419 
420 void rx_packets_option(void){
421 
422  UART_puts(UART, "\nRX FSK packets selected\n");
423 
424  radio_reset_config(SPI_RADIO_RX, preferredSettings_fsk, sizeof(preferredSettings_fsk)/sizeof(registerSetting_t));
425 
426  if (ui_set_freq(SPI_RADIO_RX))
427  return;
428 
429  if (ui_set_sym_dev(SPI_RADIO_RX))
430  return;
431 
432 
433  if (ui_set_rxbw(SPI_RADIO_RX))
434  return;
435 
436  manualCalibration(SPI_RADIO_RX);
437 
438  uint8_t num_bytes, marcState;
439  uint8_t rxBuff[256]; // can only read the 128 FIFO bytes for now though
440  uint8_t i;
441 
442  SPI_cmd(SPI_RADIO_RX, CC112X_SRX);
443 
444  while(1){
445 
446  //wait for packet
447  while(cc1125_pollGPIO(GPIO0_RADIO_RX) == 0){};
448  while(cc1125_pollGPIO(GPIO0_RADIO_RX) > 0){};
449 
450 
451  //move to the cc1125 file
452 
453  // see how long the packet is
454  cc112xSpiReadReg(SPI_RADIO_RX, CC112X_NUM_RXBYTES, &num_bytes);
455  if(num_bytes) {
456 
457  // Read MARCSTATE to check for RX FIFO error
458  cc112xSpiReadReg(SPI_RADIO_RX, CC112X_MARCSTATE, &marcState);
459  if((marcState & 0x1F) == 0x11) { // == RX_FIFO_ERROR?
460  UART_puts(UART, "\nError, FIFO error... :/\n");
461  // Flush RX FIFO
462  SPI_cmd(SPI_RADIO_RX, CC112X_SFRX);
463  } else {
464 
465 
466  cc112xSpiReadRxFifo(SPI_RADIO_RX, rxBuff, num_bytes);
467 
468  // Check CRC ok (CRC_OK: bit7 in second status byte)
469  // This assumes status bytes are appended in RX_FIFO
470  // (PKT_CFG1.APPEND_STATUS = 1)
471  // If CRC is disabled the CRC_OK field will read 1
472  if(rxBuff[num_bytes - 1] & 0x80) {
473  snprintf(uart_out_buff, UART_BUFF_LEN, "Rx OK (%d bytes) - ", num_bytes);
474 
475  }else{
476  snprintf(uart_out_buff, UART_BUFF_LEN, "CRC ERR (%d bytes) - ", num_bytes);
477  }
478  UART_puts(UART, uart_out_buff);
479 
480  for (i = 0; i < num_bytes; i++){
481  snprintf(uart_out_buff, UART_BUFF_LEN, "%02x ", rxBuff[i]);
482  UART_puts(UART, uart_out_buff);
483  }
484  UART_puts(UART, " ");
485  for (i = 0; i < num_bytes; i++){
486  if (rxBuff[i] < 32)
487  UART_putc(UART, ' ');
488  else
489  UART_putc(UART, (char)rxBuff[i]);
490  }
491 
492  UART_putc(UART, '\n');
493  }
494  }
495  else
496  UART_puts(UART, "\nError, Pin asserted, but no bytes in FIFO! :/\n");
497 
498  SPI_cmd(SPI_RADIO_RX, CC112X_SRX);
499 
500  }
501 
502 }
503 
504 void tx_packets_option(void){
505 
506 
507  UART_puts(UART, "\nTX FSK packets selected\n");
508 
509  radio_reset_config(SPI_RADIO_TX, preferredSettings_fsk, sizeof(preferredSettings_fsk)/sizeof(registerSetting_t));
510 
511  if (ui_set_freq_power(SPI_RADIO_TX))
512  return;
513 
514  if (ui_set_sym_dev(SPI_RADIO_TX))
515  return;
516 
517  //while(wait_for_response_char() != 'q'){};
518  uint32_t len = ui_set_packet_len(256-3, 6);
519  if (len < 1)
520  return;
521 
522  uint16_t wait = ui_get_packet_wait();
523 
524  uint32_t cnt=0;
525  char c;
526 
527  UART_puts(UART, "w/s - Increase/decrease power in ~0.5dB increments\n");
528  UART_puts(UART, "a/d - Increase/decrease frequency in 500Hz increments\n\n");
529  while(1){
530  manualCalibration(SPI_RADIO_TX);
531 
532  uint8_t buff[256];
533  uint8_t i;
534  cnt++;
535  buff[0] = (uint8_t)len;
536  buff[1] = current_pwr_reg;
537  buff[2] = (uint8_t)(cnt & 0xFF);
538  buff[3] = (uint8_t)((cnt>>8) & 0xFF);
539  buff[4] = (uint8_t)((cnt>>16) & 0xFF);
540  buff[5] = (uint8_t)((cnt>>24) & 0xFF);
541  for (i = 6; i < len+1; i++)
542  buff[i] = i;
543 
544 
545  cc112xSpiWriteTxFifo(SPI_RADIO_TX, buff, (uint8_t)(len+1));
546 
547  SPI_cmd(SPI_RADIO_TX, CC112X_STX);
548  uint32_t w1,w2;
549 
550 
551 
552  // wait for the packet to send
553  while( cc1125_pollGPIO(GPIO0_RADIO_TX)) {} ;
554 
555  // wait a little
556  for(w2 = 0; w2 < wait; w2++){
557  for(w1 = 0; w1 < 1000; w1++) {};
558  }
559 
560  c = peek_for_response_char();
561  if (c == 'w'){
562  SPI_cmd(SPI_RADIO_TX, CC112X_SIDLE);
563  if (radio_set_pwr_reg(SPI_RADIO_TX, (uint8_t)(current_pwr_reg+1))==0){
564  current_pwr_reg++;
565  snprintf(uart_out_buff, UART_BUFF_LEN, "Power register set to: %i (~%2.1f dBm)\n", current_pwr_reg, radio_pwr_reg_to_dbm(current_pwr_reg));
566  UART_puts(UART, uart_out_buff);
567  }
568  }
569  if (c == 's'){
570  SPI_cmd(SPI_RADIO_TX, CC112X_SIDLE);
571  if (radio_set_pwr_reg(SPI_RADIO_TX, (uint8_t)(current_pwr_reg-1))==0){
572  current_pwr_reg--;
573  snprintf(uart_out_buff, UART_BUFF_LEN, "Power register set to: %i (~%2.1f dBm)\n", current_pwr_reg, radio_pwr_reg_to_dbm(current_pwr_reg));
574  UART_puts(UART, uart_out_buff);
575  }
576  }
577  if (c == 'd'){
578  SPI_cmd(SPI_RADIO_TX, CC112X_SIDLE);
579  current_freq += 0.0005;
580  radio_set_freq_f(SPI_RADIO_TX, &current_freq);
581  snprintf(uart_out_buff, UART_BUFF_LEN, "Frequency set to: %3.4f MHz\n", current_freq);
582  UART_puts(UART, uart_out_buff);
583  }
584  if (c == 'a'){
585  SPI_cmd(SPI_RADIO_TX, CC112X_SIDLE);
586  current_freq -= 0.0005;
587  radio_set_freq_f(SPI_RADIO_TX, &current_freq);
588  snprintf(uart_out_buff, UART_BUFF_LEN, "Frequency set to: %3.4f MHz\n", current_freq);
589  UART_puts(UART, uart_out_buff);
590  }
591 
592 
593 
594  if (c == 'q')
595  return;
596 
597  }
598 
599 
600  return;
601 }
602 
603 void tx_packets_pwrsweep_option(void){
604 
605 
606  UART_puts(UART, "\nTX FSK packets power sweep selected\n");
607 
608  radio_reset_config(SPI_RADIO_TX, preferredSettings_fsk, sizeof(preferredSettings_fsk)/sizeof(registerSetting_t));
609 
610  if (ui_set_freq(SPI_RADIO_TX))
611  return;
612 
613  if (ui_set_sym_dev(SPI_RADIO_TX))
614  return;
615 
616  uint32_t len = ui_set_packet_len(256-3, 6);
617  if (len < 1)
618  return;
619 
620  uint16_t wait = ui_get_packet_wait();
621 
622  uint32_t cnt=1;
623  uint8_t pwr_reg = 3;
624  uint8_t writebyte;
625 
626  while(1){
627 
628  for (pwr_reg = 3; pwr_reg < 0x3F; pwr_reg++){
629  writebyte = (uint8_t)((1<<6) | pwr_reg);
630  cc112xSpiWriteReg(SPI_RADIO_TX, CC112X_PA_CFG2, &writebyte);
631 
632  manualCalibration(SPI_RADIO_TX);
633 
634  uint8_t buff[256];
635  uint8_t i;
636 
637  buff[0] = (uint8_t)len;
638  buff[1] = pwr_reg;
639  buff[2] = (uint8_t)(cnt & 0xFF);
640  buff[3] = (uint8_t)((cnt>>8) & 0xFF);
641  buff[4] = (uint8_t)((cnt>>16) & 0xFF);
642  buff[5] = (uint8_t)((cnt>>24) & 0xFF);
643  for (i = 6; i < len+1; i++)
644  buff[i] = i;
645 
646 
647  cc112xSpiWriteTxFifo(SPI_RADIO_TX, buff, (uint8_t)(len+1));
648 
649  SPI_cmd(SPI_RADIO_TX, CC112X_STX);
650  uint32_t w1,w2;
651 
652 
653 
654  // wait for the packet to send
655  while( cc1125_pollGPIO(GPIO0_RADIO_TX)) {} ;
656 
657  // wait a little
658  for(w2 = 0; w2 < wait; w2++){
659  for(w1 = 0; w1 < 1000; w1++) {};
660  }
661  }
662  cnt++;
663 
664  }
665 
666 
667  return;
668 }
669 
670 void cw_tone_option(void){
671 
672 
673  UART_puts(UART, "\nCW tone selected\n");
674 
675  radio_reset_config(SPI_RADIO_TX, preferredSettings_cw, sizeof(preferredSettings_cw)/sizeof(registerSetting_t));
676  manualCalibration(SPI_RADIO_TX);
677 
678  if (ui_set_freq_power(SPI_RADIO_TX))
679  return;
680 
681  // turn on radio
682  UART_puts(UART, "CW tone on. Press q to quit\n");
683  SPI_cmd(SPI_RADIO_TX, CC112X_STX);
684 
685  while(wait_for_response_char() != 'q'){};
686  radio_reset_config(SPI_RADIO_TX, preferredSettings_cw, sizeof(preferredSettings_cw)/sizeof(registerSetting_t));
687 
688 
689 }
void UART_init(uint8_t uart_num, uint32_t baudrate)
Definition: uart.c:78
char UART_getc(uint8_t uart_num)
Definition: uart.c:113
Definition: uart.c:23
int main(void)
Runs all module tests.
Definition: test.c:19
bool UART_charsAvail(uint8_t uart_num)
Definition: uart.c:203
void UART_puts(uint8_t uart_num, char *str)
Definition: uart.c:129
void Board_init(void)
Definition: board.c:13
void WDT_kick(void)
Definition: wdt.c:19
uint8_t SPI_cmd(uint8_t spi_num, uint8_t cmd)
Definition: spi.c:15
void UART_putc(uint8_t uart_num, char c)
Definition: uart.c:121