IO Pin Initialization

classic Classic list List threaded Threaded
1 message Options
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

IO Pin Initialization

I may have missed this in the new documentation, but I have a question  
regarding what policy one should use for initializing devices that  
take over function of IO pins and either are essential or non-
essential for getting a functional session up and running.

What I mean by this is the following:
Say I have a device that can use the same pin set for an additional  
UART or an SPI interface, or certain pins can be used for ADC or CAN.  
If the device is an essential UART, for the console, I can see  
including that in the uarts_init() for example, but if the pins are  
reconfigurable, should that automatically go in the setup for that  
type of peripheral?  i.e. pin configuration happens when I call  
spi.setup(...).  I would figure that the answer to this would be yes,  
but I'm unsure.

Also, for the pin configuration itself, should general practice  
dictate that the pin configuration itself is done through  
platform_pio_op?  I would guess yes? Perhaps with platform_pio_op  
providing some standardized mechanisms for this setup so that setup  
code for peripherals could be generalized slightly?

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: 847.448.0386





_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev

smime.p7s (5K) Download Attachment