I am developing firmware for an MCF51EM256 microcontroller and using MQX as the basis for my solution. One of the requirements is that I need to communicate with a digital thermometer device that uses a 1-wire interface. This device is a Maxim DS18S20+ and after reading the datasheet I can see that to implement the interface I am going to need much finer (and deterministic) control over the microcontroller I/O pin than can be achieved using the GPIO drivers provided with MQX. I am also going to need to be able to flip the pin direction between an output and an input pin, something that I don't think is even possible through the GPIO driver (please feel free to either challenge or confirm that last statement).
Does anyone know if there is a "recommended" way to use a GPIO pin on the microcontroller without going through the GPIO drivers? I was wondering if there is anything that I need to be aware of so that I don't end up in conflict with either the GPIO driver or MQX. For example:
- How can I be sure that if I configure the port pin that the GPIO driver isn't going to re-configure it (during initializing the ports for example)?
- If the GPIO driver is being used to control another pin on the same port, how will this affect the pin I am trying to use?
- If I change the direction of a port pin such that it is different from that that maintained by the GPIO driver is that going to cause problems, or would that only occur if I had opened a GPIO device and included that particular pin in the set of pins to be used?