rfLPC
A low level library for using NXP's LPC17xx SoC. Config is given for MBED prototyping board
gpio.h File Reference

GPIO peripheral driver. More...

#include <stdint.h>
#include "../nxp/LPC17xx.h"
#include "../tools.h"
#include "../pinconf.h"

Go to the source code of this file.

Functions

void rflpc_gpio_use_pin (rflpc_pin_t pin, rflpc_pin_mode_t mode)
 Configures the multi-purpose pins of the CM3 so that it uses a given GPIO pin. More...
 
void rflpc_gpio_set_pin_mode_input (rflpc_pin_t pin, rflpc_pin_mode_t mode)
 Sets a pin to input mode. More...
 
void rflpc_gpio_set_pin_mode_output (rflpc_pin_t pin, uint8_t val)
 Sets a pin to output mode Uses a pin as output pin and sets its value. More...
 
void rflpc_gpio_set_pin (rflpc_pin_t pin)
 Set a pin (put a logical 1 on it)
 
void rflpc_gpio_clr_pin (rflpc_pin_t pin)
 Clear a pin (put a logical 0 on it)
 
void rflpc_gpio_set_pins_from_mask (uint8_t gpio, uint32_t mask)
 Set multiple pins from a mask.
 
void rflpc_gpio_clr_pins_from_mask (uint8_t gpio, uint32_t mask)
 Clean multiple pins from a mask.
 
void rflpc_gpio_set_pin_val (rflpc_pin_t pin, int val)
 Sets the value of a pin (0 or 1)
 
void rflpc_gpio_set_val (uint8_t gpio, uint32_t val, uint32_t mask)
 Sets the value of multiple pins of a given port from a mask and a value.
 
int rflpc_gpio_get_pin (rflpc_pin_t pin)
 Gets the value of a pin.
 
uint32_t rflpc_gpio_get_val (uint8_t gpio)
 Gets the value of the entire port.
 

Detailed Description

GPIO peripheral driver.

Definition in file gpio.h.