RTEMS 6.1-rc4
|
#include "chip.h"
Functions | |
uint8_t | PIO_Configure (const Pin *list, uint32_t size) |
Configures a list of Pin instances, each of which can either hold a single pin or a group of pins, depending on the mask value; all pins are configured by this function. The size of the array must also be provided and is easily computed using PIO_LISTSIZE whenever its length is not known in advance. | |
void | PIO_Set (const Pin *pin) |
Sets a high output level on all the PIOs defined in the given Pin instance. This has no immediate effects on PIOs that are not output, but the PIO controller will memorize the value they are changed to outputs. | |
void | PIO_Clear (const Pin *pin) |
Sets a low output level on all the PIOs defined in the given Pin instance. This has no immediate effects on PIOs that are not output, but the PIO controller will memorize the value they are changed to outputs. | |
unsigned char | PIO_Get (const Pin *pin) |
Returns 1 if one or more PIO of the given Pin instance currently have a high level; otherwise returns 0. This method returns the actual value that is being read on the pin. To return the supposed output value of a pin, use PIO_GetOutputDataStatus() instead. | |
unsigned char | PIO_GetOutputDataStatus (const Pin *pin) |
Returns 1 if one or more PIO of the given Pin are configured to output a high level (even if they are not output). To get the actual value of the pin, use PIO_Get() instead. | |
void | PIO_SetDebounceFilter (const Pin *pin, uint32_t cuttoff) |
Configures Glitch or Denouncing filter for input. | |
void | PIO_EnableWriteProtect (const Pin *pin) |
Enable write protect. | |
void | PIO_DisableWriteProtect (const Pin *pin) |
Disable write protect. | |
uint32_t | PIO_GetWriteProtectViolationInfo (const Pin *pin) |
Get write protect violation information. | |
void | PIO_SetPinType (Pin *pin, uint8_t pinType) |
Set pin type the pin is controlled by the corresponding peripheral (A, B, C, D,E) | |
void | PIO_SetDriveStrength (const Pin *pin, uint8_t strength) |
Set the drive strength of the pin. | |
void PIO_Clear | ( | const Pin * | pin | ) |
Sets a low output level on all the PIOs defined in the given Pin instance. This has no immediate effects on PIOs that are not output, but the PIO controller will memorize the value they are changed to outputs.
pin | Pointer to a Pin instance describing one or more pins. |
uint8_t PIO_Configure | ( | const Pin * | list, |
uint32_t | size | ||
) |
Configures a list of Pin instances, each of which can either hold a single pin or a group of pins, depending on the mask value; all pins are configured by this function. The size of the array must also be provided and is easily computed using PIO_LISTSIZE whenever its length is not known in advance.
list | Pointer to a list of Pin instances. |
size | Size of the Pin list (calculated using PIO_LISTSIZE). |
void PIO_DisableWriteProtect | ( | const Pin * | pin | ) |
Disable write protect.
pin | Pointer to a Pin instance describing one or more pins. |
void PIO_EnableWriteProtect | ( | const Pin * | pin | ) |
Enable write protect.
pin | Pointer to a Pin instance describing one or more pins. |
unsigned char PIO_Get | ( | const Pin * | pin | ) |
Returns 1 if one or more PIO of the given Pin instance currently have a high level; otherwise returns 0. This method returns the actual value that is being read on the pin. To return the supposed output value of a pin, use PIO_GetOutputDataStatus() instead.
pin | Pointer to a Pin instance describing one or more pins. |
unsigned char PIO_GetOutputDataStatus | ( | const Pin * | pin | ) |
Returns 1 if one or more PIO of the given Pin are configured to output a high level (even if they are not output). To get the actual value of the pin, use PIO_Get() instead.
pin | Pointer to a Pin instance describing one or more pins. |
uint32_t PIO_GetWriteProtectViolationInfo | ( | const Pin * | pin | ) |
Get write protect violation information.
pin | Pointer to a Pin instance describing one or more pins. |
void PIO_Set | ( | const Pin * | pin | ) |
Sets a high output level on all the PIOs defined in the given Pin instance. This has no immediate effects on PIOs that are not output, but the PIO controller will memorize the value they are changed to outputs.
pin | Pointer to a Pin instance describing one or more pins. |
void PIO_SetDebounceFilter | ( | const Pin * | pin, |
uint32_t | cuttoff | ||
) |
Configures Glitch or Denouncing filter for input.
pin | Pointer to a Pin instance describing one or more pins. |
cuttoff | Cut off frequency for denounce filter. |
void PIO_SetDriveStrength | ( | const Pin * | pin, |
uint8_t | strength | ||
) |
Set the drive strength of the pin.
pin | Pointer to a Pin instance describing one or more pins. |
strength | 0 for low drive strength or 1 for high drive strength. |
void PIO_SetPinType | ( | Pin * | pin, |
uint8_t | pinType | ||
) |
Set pin type the pin is controlled by the corresponding peripheral (A, B, C, D,E)
pin | Pointer to a Pin instance describing one or more pins. |
pinType | PIO_PERIPH_A, PIO_PERIPH_B, ... |