Changeset 184


Ignore:
Timestamp:
10/05/09 17:27:30 (4 years ago)
Author:
thomas
Message:
 
Location:
apps/TSCH
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • apps/TSCH/Makefile

    r181 r184  
    1414CFLAGS += -I $(TOSROOT)/apps/TSCH/globaltime 
    1515CFLAGS += -I $(TOSROOT)/apps/TSCH/printpacket 
    16 CFLAGS += -I $(TOSROOT)/apps/TSCH/serialoutput 
     16CFLAGS += -I $(TOSROOT)/apps/TSCH/serialio 
    1717CFLAGS += -I $(TOSDIR)/lib/printf 
    1818CFLAGS += -D"PRINTF_BUFFER_SIZE=3000" 
  • apps/TSCH/serialio/SerialIOC.nc

    r183 r184  
    11#include "TSCH.h" 
    22 
    3 configuration SerialOutputC { 
    4    provides interface SerialOutput; 
     3configuration SerialIOC { 
     4   provides interface SerialIO; 
    55} 
    66implementation { 
    77   components MainC; 
    8    MainC.SoftwareInit->SerialOutputP; 
     8   MainC.SoftwareInit->SerialIOP; 
    99 
    10    components SerialOutputP; 
    11    SerialOutput = SerialOutputP.SerialOutput; 
     10   components SerialIOP; 
     11   SerialIO = SerialIOP.SerialIO; 
    1212 
    1313   components HplMsp430Usart1C; 
    14    SerialOutputP.HplMsp430UsartInterrupts->HplMsp430Usart1C; 
    15    SerialOutputP.AsyncStdControl->HplMsp430Usart1C; 
    16    SerialOutputP.HplMsp430Usart->HplMsp430Usart1C; 
     14   SerialIOP.HplMsp430UsartInterrupts->HplMsp430Usart1C; 
     15   SerialIOP.AsyncStdControl->HplMsp430Usart1C; 
     16   SerialIOP.HplMsp430Usart->HplMsp430Usart1C; 
    1717    
    1818   components HplMsp430GeneralIOC; 
    19    SerialOutputP.Port63 -> HplMsp430GeneralIOC.Port63; 
     19   SerialIOP.Port63 -> HplMsp430GeneralIOC.Port63; 
    2020} 
  • apps/TSCH/serialio/SerialIOP.nc

    r183 r184  
    44}; 
    55 
    6 module SerialOutputP { 
     6module SerialIOP { 
    77   provides interface Init as SoftwareInit; 
    8    provides interface SerialOutput; 
     8   provides interface SerialIO; 
    99   uses interface HplMsp430UsartInterrupts; 
    1010   uses interface AsyncStdControl; 
     
    5353   } 
    5454 
    55    //SerialOutput 
    56    command error_t SerialOutput.copyInputBuffer(uint8_t* buffer,uint8_t max_length) { 
     55   //SerialIO 
     56   command error_t SerialIO.copyInputBuffer(uint8_t* buffer,uint8_t max_length) { 
    5757      uint8_t input_buffer_index_read=0; 
    5858      while (input_buffer_index_read<input_buffer_index_write && input_buffer_index_read<max_length) { 
     
    6262      return SUCCESS; 
    6363   } 
    64    command error_t SerialOutput.printData(uint8_t* buffer, uint8_t length) { 
     64   command error_t SerialIO.printData(uint8_t* buffer, uint8_t length) { 
    6565      uint8_t counter; 
    6666      atomic somethingInOutputBuffer=TRUE; 
     
    7272      return SUCCESS;//TBC check not overwriting 
    7373   } 
    74    command error_t SerialOutput.printError(uint8_t error_code) { 
     74   command error_t SerialIO.printError(uint8_t error_code) { 
    7575      atomic somethingInOutputBuffer=TRUE; 
    7676      atomic { 
     
    8484      return SUCCESS;//TBC check not overwriting 
    8585   } 
    86    async command void SerialOutput.startInput() { 
     86   async command void SerialIO.startInput() { 
    8787      call HplMsp430Usart.enableIntr(); 
    8888      call Port63.set(); 
     
    9292      call HplMsp430Usart.tx('y'); 
    9393   } 
    94    async command void SerialOutput.startOutput() { 
     94   async command void SerialIO.startOutput() { 
    9595      call HplMsp430Usart.enableIntr(); 
    9696      call Port63.set(); 
     
    101101      } 
    102102   } 
    103    async command void SerialOutput.stop() { 
     103   async command void SerialIO.stop() { 
    104104      call HplMsp430Usart.disableIntr(); 
    105105      call Port63.clr(); 
Note: See TracChangeset for help on using the changeset viewer.