Changeset 184
- Timestamp:
- 10/05/09 17:27:30 (4 years ago)
- Location:
- apps/TSCH
- Files:
-
- 3 edited
- 1 moved
-
Makefile (modified) (1 diff)
-
interfaces/SerialIO.nc (moved) (moved from apps/TSCH/interfaces/SerialOutput.nc)
-
serialio/SerialIOC.nc (modified) (1 diff)
-
serialio/SerialIOP.nc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
apps/TSCH/Makefile
r181 r184 14 14 CFLAGS += -I $(TOSROOT)/apps/TSCH/globaltime 15 15 CFLAGS += -I $(TOSROOT)/apps/TSCH/printpacket 16 CFLAGS += -I $(TOSROOT)/apps/TSCH/serial output16 CFLAGS += -I $(TOSROOT)/apps/TSCH/serialio 17 17 CFLAGS += -I $(TOSDIR)/lib/printf 18 18 CFLAGS += -D"PRINTF_BUFFER_SIZE=3000" -
apps/TSCH/serialio/SerialIOC.nc
r183 r184 1 1 #include "TSCH.h" 2 2 3 configuration Serial OutputC {4 provides interface Serial Output;3 configuration SerialIOC { 4 provides interface SerialIO; 5 5 } 6 6 implementation { 7 7 components MainC; 8 MainC.SoftwareInit->Serial OutputP;8 MainC.SoftwareInit->SerialIOP; 9 9 10 components Serial OutputP;11 Serial Output = SerialOutputP.SerialOutput;10 components SerialIOP; 11 SerialIO = SerialIOP.SerialIO; 12 12 13 13 components HplMsp430Usart1C; 14 Serial OutputP.HplMsp430UsartInterrupts->HplMsp430Usart1C;15 Serial OutputP.AsyncStdControl->HplMsp430Usart1C;16 Serial OutputP.HplMsp430Usart->HplMsp430Usart1C;14 SerialIOP.HplMsp430UsartInterrupts->HplMsp430Usart1C; 15 SerialIOP.AsyncStdControl->HplMsp430Usart1C; 16 SerialIOP.HplMsp430Usart->HplMsp430Usart1C; 17 17 18 18 components HplMsp430GeneralIOC; 19 Serial OutputP.Port63 -> HplMsp430GeneralIOC.Port63;19 SerialIOP.Port63 -> HplMsp430GeneralIOC.Port63; 20 20 } -
apps/TSCH/serialio/SerialIOP.nc
r183 r184 4 4 }; 5 5 6 module Serial OutputP {6 module SerialIOP { 7 7 provides interface Init as SoftwareInit; 8 provides interface Serial Output;8 provides interface SerialIO; 9 9 uses interface HplMsp430UsartInterrupts; 10 10 uses interface AsyncStdControl; … … 53 53 } 54 54 55 //Serial Output56 command error_t Serial Output.copyInputBuffer(uint8_t* buffer,uint8_t max_length) {55 //SerialIO 56 command error_t SerialIO.copyInputBuffer(uint8_t* buffer,uint8_t max_length) { 57 57 uint8_t input_buffer_index_read=0; 58 58 while (input_buffer_index_read<input_buffer_index_write && input_buffer_index_read<max_length) { … … 62 62 return SUCCESS; 63 63 } 64 command error_t Serial Output.printData(uint8_t* buffer, uint8_t length) {64 command error_t SerialIO.printData(uint8_t* buffer, uint8_t length) { 65 65 uint8_t counter; 66 66 atomic somethingInOutputBuffer=TRUE; … … 72 72 return SUCCESS;//TBC check not overwriting 73 73 } 74 command error_t Serial Output.printError(uint8_t error_code) {74 command error_t SerialIO.printError(uint8_t error_code) { 75 75 atomic somethingInOutputBuffer=TRUE; 76 76 atomic { … … 84 84 return SUCCESS;//TBC check not overwriting 85 85 } 86 async command void Serial Output.startInput() {86 async command void SerialIO.startInput() { 87 87 call HplMsp430Usart.enableIntr(); 88 88 call Port63.set(); … … 92 92 call HplMsp430Usart.tx('y'); 93 93 } 94 async command void Serial Output.startOutput() {94 async command void SerialIO.startOutput() { 95 95 call HplMsp430Usart.enableIntr(); 96 96 call Port63.set(); … … 101 101 } 102 102 } 103 async command void Serial Output.stop() {103 async command void SerialIO.stop() { 104 104 call HplMsp430Usart.disableIntr(); 105 105 call Port63.clr();
Note: See TracChangeset
for help on using the changeset viewer.
