|
Files |
file | otPort.h |
| Parallel Port Library for BF51x.
|
Modules |
| Version History |
| Port F access and configuration shortcuts |
| Port G access and configuration shortcuts |
| Port H access and configuration shortcuts |
| Port - Code example |
Enumerations |
enum | PortId { PP_F,
PP_G,
PP_H
} |
| Port selection. More...
|
enum | PortConfig {
P_OUT,
P_IN,
P_IN_H,
P_FUN1,
P_FUN2,
P_FUN3
} |
| Port mode selection. More...
|
Functions |
void | PortConfig (int portId, int bit, int function) |
| Configure a bit (15:0) of a desidered port with a requested function, see PortConfig. Each port can be configured as INPUT, OUTPUT or FUNCTION.
|
void | PortFastSwitch (int portId, int bit, int function) |
| Switch a bit (15:0) of a desidered port as input (P_IN) or output (P_OUT). For correctness it is good to use this function after having used PortConfig at least once.
It is a quick way to change the bit of a port from input to output or vice versa.
It is used by the functions of SMBus.
|
void | PortSet (int portId, int bit, bool set) |
| Set or reset a bit on specified port.
|
void | PortToggle (int portId, int bit) |
| Toggle a bit on specified port.
|
bool | PortGet (int portId, int bit) |
| Read a bit on specified port.
|
void | PortFSetInterruptService (int bit, void(*pCallback)(), bool rising) |
| Configure an interrupt for a bit(s) on port F.
|
void | PortFInterruptEnable (int bit, bool ena) |
| Enable or Disable the interrupt by selected bit(s) on port F.
|
void | PortGSetInterruptService (int bit, void(*pCallback)(), bool rising) |
| Configure an interrupt for a bit(s) on port G.
|
void | PortFSetInterruptBothEdges (int bit, bool both) |
| Enable an interrupt for a bit(s) on port F on rising and falling edge.
|
void | PortGSetInterruptBothEdges (int bit, bool both) |
| Enable an interrupt for a bit(s) on port G on rising and falling edge.
|
void | PortGInterruptEnable (int bit, bool ena) |
| Enable or Disable the interrupt by selected bit(s) on port G.
|
void | PortFClearInterrupt () |
| Clear the interrupt request on port F.
|
void | PortGClearInterrupt () |
| Clear the interrupt request on port G.
|
Variables |
volatile U16 * | _ppf [20] |
| Trick for C++ compatibility.
|
volatile U16 * | _ppg [20] |
| Trick for C++ compatibility.
|
volatile U16 * | _pph [20] |
| Trick for C++ compatibility.
|