mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
Functions | |
PinName | port_pin (PortName port, int pin_n) |
Get the pin name from the port's pin number. | |
void | port_init (port_t *obj, PortName port, int mask, PinDirection dir) |
Initilize the port. | |
void | port_mode (port_t *obj, PinMode mode) |
Set the input port mode. | |
void | port_dir (port_t *obj, PinDirection dir) |
Set port direction (in/out) | |
void | port_write (port_t *obj, int value) |
Write value to the port. | |
int | port_read (port_t *obj) |
Read the current value on the port. |
Function Documentation
void port_dir | ( | port_t * | obj, |
PinDirection | dir | ||
) |
Set port direction (in/out)
- Parameters:
-
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.
- Parameters:
-
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.
- Parameters:
-
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.
- Parameters:
-
port The port name pin_n The pin number within the specified port
- Returns:
- The pin name for the port's pin number
int port_read | ( | port_t * | obj ) |
Read the current value on the port.
- Parameters:
-
obj The port object
- Returns:
- An integer with each bit corresponding to an associated port pin setting
void port_write | ( | port_t * | obj, |
int | value | ||
) |
Write value to the port.
- Parameters:
-
obj The port object value The value to be set
Generated on Wed Jul 13 2022 02:23:49 by 1.7.2