X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Flib%2Fatmega168.c;fp=firmware%2Flib%2Fatmega168.c;h=36795faf1c9177d5e0644d6928f7103dd3e4c0ae;hp=0000000000000000000000000000000000000000;hb=21ff17d2af1e50542d9343d7177269a8910ebbe3;hpb=b7d9fbe513b06c233ee41a4b719ac894e6b13d16 diff --git a/firmware/lib/atmega168.c b/firmware/lib/atmega168.c new file mode 100644 index 0000000..36795fa --- /dev/null +++ b/firmware/lib/atmega168.c @@ -0,0 +1,89 @@ +//! MSP430F1612/1611 clock and I/O definitions + +#include "platform.h" + +//! Receive a byte. +unsigned char serial0_rx(){ + return 0; +} + +//! Receive a byte. +unsigned char serial1_rx(){ + return 0; +} + +//! Transmit a byte. +void serial0_tx(unsigned char x){ +} + +//! Transmit a byte on the second UART. +void serial1_tx(unsigned char x){ +} + +//! Set the baud rate. +void setbaud0(unsigned char rate){ + + //http://mspgcc.sourceforge.net/baudrate.html + switch(rate){ + case 1://9600 baud + + break; + case 2://19200 baud + + break; + case 3://38400 baud + + break; + case 4://57600 baud + + break; + default: + case 5://115200 baud + + break; + } +} + +//! Set the baud rate of the second uart. +void setbaud1(unsigned char rate){ + //http://mspgcc.sourceforge.net/baudrate.html + switch(rate){ + case 1://9600 baud + + break; + case 2://19200 baud + + break; + case 3://38400 baud + + break; + case 4://57600 baud + + break; + default: + case 5://115200 baud + + break; + } +} + + +void msp430_init_uart0(){ +} + + +void msp430_init_uart1(){ +} + + + +//! Initialization is correct. +void msp430_init_dco_done(){ + //Nothing to do for the 1612. +} + + +void msp430_init_dco() { + +} +