]> oss.titaniummirror.com Git - tinyos-2.x.git/commit
Clean up pin configuration for peripheral code. Here's the best practice
authorsmckown <smckown@4bc1554a-c7f2-4f65-a403-e0be01f0239c>
Fri, 12 Sep 2008 22:11:15 +0000 (22:11 +0000)
committerR. Steve McKown <rsmckown@gmail.com>
Tue, 1 Dec 2009 03:00:58 +0000 (20:00 -0700)
commitb62e80d588af0c73dca0c88224d5117e9df8bcb8
tree40c02753143f2d877ff1d720ab51354fd94406f8
parent155929808405214eb334b8e41ad69875a1e6576e
Clean up pin configuration for peripheral code.  Here's the best practice
for platforms.  MotePlatformC defines pins, using also the new PxREN feature,
such that the peripheral pins are inputs with pull up/down's, or outputs, as
required to meet the electrical characteristics when the peripheral is not on.
In the peripheral's implementation of ResourceConfigure, it sets module
function on configure() and sets back to IO funtion on unconfigure(), but
only if the pin was set to IO mode when configure() was called.  This latter
condition allows a MotePlatformC to set peripheral mode on for pins that will
always be used for peripheral function, and the modes won't switch around.
tos/chips/msp430/usci/Msp430SpiP.nc
tos/chips/msp430/usci/Msp430UartP.nc
tos/platforms/tmicore/MotePlatformC.nc