todlandis/prod — comment on commit c9e2fd78add73ed4a15799db9278acbe43c3484a
File: tos/chips/lis3dh/LIS3DHP.nc line 102
By cire831:

Note: This sequence (makeOutput followed by set) is sort of dangerous. As soon as the makeOutput is hit, the previous value of the pin will be driven. If it is clear, the pin will glitch as it gets driven first low then when the set hits back high.

It is better to write this as (CSN.set(); CSN.makeOutput();). Just an aside.

This code is fine for now (although you might want to swap the makeOutput and set). But eventually we will want to bury this in PlatformInit and not have seperate Init.inits for each device. That is expensive in terms of code generation. And it is much simpler to just set the configuration registers up at one time.