#include <lpc21xx.h> /* LPC21xx definitions */\r
#include <deb_led.h>\r
#include "startcfg.h"\r
-#include "pwrstep.h"\r
-#include "uart.h"\r
#include <stdlib.h>\r
#include <error.h>\r
\r
if (err) error(err);\r
\r
set_APB(APB_DIV_2);\r
- init_pwr();\r
-\r
-\r
- init_uart0((int)9600 ,UART_BITS_8, UART_STOP_BIT_1, UART_PARIT_OFF, 0 );\r
+
\r
}\r
\r
#include <lpc21xx.h> /* LPC21xx definitions */
#include <errno.h>
#include "startcfg.h"
-#include "pwrstep.h"
-#include "uart.h"
#include <deb_led.h>
extern unsigned int adc_val[4];
deb_led_set(leds[i]);
if (++i == LEDS) i=0;
wait();
-
- uart0SendCh(0xAA);
- uart0SendCh(0x1);
- uart0SendCh(' ');
- uart0SendCh((adc_val[0] >> 8) & 0xFF);
- uart0SendCh((adc_val[0]) & 0xFF);
-
-
-
- uart0SendCh(0xAA);
- uart0SendCh(0x2);
- uart0SendCh(' ');
- uart0SendCh((adc_val[1] >> 8) & 0xFF);
- uart0SendCh((adc_val[1]) & 0xFF);
-
-
- uart0SendCh(0xAA);
- uart0SendCh(0x3);
- uart0SendCh(' ');
- uart0SendCh((adc_val[2] >> 8) & 0xFF);
- uart0SendCh((adc_val[2]) & 0xFF);
-
- uart0SendCh(0xAA);
- uart0SendCh(0x4);
- uart0SendCh(' ');
- uart0SendCh((adc_val[3] >> 8) & 0xFF);
- uart0SendCh((adc_val[3]) & 0xFF);
-
-
- pwr_33(PWR_ON);
- pwr_50(PWR_ON);
- pwr_80(PWR_ON);
}
return 0;