[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/tos/platform/shimmer hardware.h, 1.10, 1.11

steve ayer ayer1 at users.sourceforge.net
Wed Jul 16 11:33:39 PDT 2008


Update of /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/platform/shimmer
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30172

Modified Files:
	hardware.h 
Log Message:

fixed a very subtle power drain bug that only showed up on some
devices in sleep, and cleaned up some other missed details on this
same subject.

main attraction:  GIO0 was changed to an input to accomodate the fact
that it was attached to a pulldown, meant for a button on the external
connector.

when an output, some boards burned ~180 ua sleeping, the others 630
ua.  as an input, we changed this reading on an example of the latter
to 180.

thanks to catalin caranfil at realtime oem for finding the problem and
pushing for a solution for the masses!

other changes:

- made onewire (data) input
- made the spi pins all gpio in appropriate directions for their
connections
- made bt_pio input, as appropriate for its connection
- blitzed some cruft about "osram" lcd pins


Index: hardware.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/platform/shimmer/hardware.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** hardware.h	22 Jan 2008 20:14:27 -0000	1.10
--- hardware.h	16 Jul 2008 18:33:37 -0000	1.11
***************
*** 98,120 ****
  TOSH_ASSIGN_PIN(DAC1_AN, 6, 7);
  
- #define OSRAM
- #ifdef OSRAM
- 
- // OSRAM OLED Calgary
- TOSH_ASSIGN_PIN(LCD_RESET_L, 6, 1);   //  aka adc_1
- TOSH_ASSIGN_PIN(LCD_CS_N,  6, 2);   //  aka adc_2
- TOSH_ASSIGN_PIN(LCD_REG_ENABLE,  6, 6);   //  aka adc_2
- TOSH_ASSIGN_PIN(LCD_CMD_L,   1, 1);   //  aka bsl_tx (prog_out)
- 
- #else
- 
- // Kent ChLCD
- TOSH_ASSIGN_PIN(LCD_RESET_L, 1, 1);   //  aka bsl_tx
- TOSH_ASSIGN_PIN(LCD_CS_N,  1, 3);   //  aka ser0_rts
- TOSH_ASSIGN_PIN(LCD_REG_ENABLE,  6, 6);   //  aka adc_2
- TOSH_ASSIGN_PIN(LCD_BUSY, 2, 0);   //  aka gpio_external
- 
- #endif
- 
  // UART pins
  // SPI1 attached to bt, cc2420
--- 98,101 ----
***************
*** 204,208 ****
    TOSH_SEL_BT_RTS_IOFUNC();
  
!   TOSH_MAKE_BT_PIO_OUTPUT();
    TOSH_SEL_BT_PIO_IOFUNC();
  
--- 185,189 ----
    TOSH_SEL_BT_RTS_IOFUNC();
  
!   TOSH_MAKE_BT_PIO_INPUT();
    TOSH_SEL_BT_PIO_IOFUNC();
  
***************
*** 222,225 ****
--- 203,226 ----
    TOSH_SEL_PROG_OUT_IOFUNC();
  
+   // USART lines, attached to a pullup
+   TOSH_SEL_UCLK0_IOFUNC();
+   TOSH_MAKE_UCLK0_OUTPUT();
+   TOSH_SET_UCLK0_PIN();
+   TOSH_SEL_UCLK1_IOFUNC();
+   TOSH_MAKE_UCLK1_OUTPUT();
+   TOSH_SET_UCLK1_PIN();
+ 
+   TOSH_SEL_SIMO0_IOFUNC();
+   TOSH_MAKE_SIMO0_OUTPUT();
+   TOSH_SET_SIMO0_PIN();
+   TOSH_SEL_SOMI0_IOFUNC();
+   TOSH_MAKE_SOMI0_INPUT();
+ 
+   TOSH_SEL_SIMO1_IOFUNC();
+   TOSH_MAKE_SIMO1_OUTPUT();
+   TOSH_SET_SIMO1_PIN();
+   TOSH_SEL_SOMI1_IOFUNC();
+   TOSH_MAKE_SOMI1_INPUT();
+ 
  
    // ADC lines
***************
*** 259,262 ****
--- 260,264 ----
    TOSH_MAKE_ONEWIRE_PWR_OUTPUT();
    TOSH_SEL_ONEWIRE_PWR_IOFUNC();
+   TOSH_MAKE_ONEWIRE_INPUT();
    TOSH_SEL_ONEWIRE_IOFUNC();
  
***************
*** 287,291 ****
    TOSH_MAKE_SER0_RTS_OUTPUT();
    TOSH_SEL_SER0_RTS_IOFUNC();
!   TOSH_MAKE_GIO0_OUTPUT();
    TOSH_SEL_GIO0_IOFUNC();
    TOSH_MAKE_GIO1_OUTPUT();
--- 289,293 ----
    TOSH_MAKE_SER0_RTS_OUTPUT();
    TOSH_SEL_SER0_RTS_IOFUNC();
!   TOSH_MAKE_GIO0_INPUT();
    TOSH_SEL_GIO0_IOFUNC();
    TOSH_MAKE_GIO1_OUTPUT();



More information about the Tinyos-contrib-commits mailing list