Functions | |
| PinName | port_pin (PortName port, int pin_n) |
| Get the pin name from the port's pin number. More... | |
| void | port_init (port_t *obj, PortName port, int mask, PinDirection dir) |
| Initilize the port. More... | |
| void | port_mode (port_t *obj, PinMode mode) |
| Set the input port mode. More... | |
| void | port_dir (port_t *obj, PinDirection dir) |
| Set port direction (in/out) More... | |
| void | port_write (port_t *obj, int value) |
| Write value to the port. More... | |
| int | port_read (port_t *obj) |
| Read the current value on the port. More... | |
| void port_dir | ( | port_t * | obj, |
| PinDirection | dir | ||
| ) |
Set port direction (in/out)
| obj | The port object |
| dir | The port direction to be set |
| void port_init | ( | port_t * | obj, |
| PortName | port, | ||
| int | mask, | ||
| PinDirection | dir | ||
| ) |
Initilize the port.
| obj | The port object to initialize |
| port | The port name |
| mask | The bitmask to identify which bits in the port should be included (0 - ignore) |
| dir | The port direction |
| void port_mode | ( | port_t * | obj, |
| PinMode | mode | ||
| ) |
Set the input port mode.
| obj | The port object |
| mode | THe port mode to be set |
| PinName port_pin | ( | PortName | port, |
| int | pin_n | ||
| ) |
Get the pin name from the port's pin number.
| port | The port name |
| pin_n | The pin number within the specified port |
| int port_read | ( | port_t * | obj | ) |
Read the current value on the port.
| obj | The port object |
| void port_write | ( | port_t * | obj, |
| int | value | ||
| ) |
Write value to the port.
| obj | The port object |
| value | The value to be set |