20#include "periph_cpu.h" 
   31#define GPIO_PORT_1     ((gpio_port_t)&PORT_1.base) 
   32#define GPIO_PORT_2     ((gpio_port_t)&PORT_2.base) 
   33#define GPIO_PORT_3     ((gpio_port_t)&PORT_3.base) 
   34#define GPIO_PORT_4     ((gpio_port_t)&PORT_4.base) 
   35#define GPIO_PORT_5     ((gpio_port_t)&PORT_5.base) 
   36#define GPIO_PORT_6     ((gpio_port_t)&PORT_6.base) 
   39#if defined(CPU_FAM_MSP430_F2XX_G2XX) 
   40#  define GPIO_PORT_7   ((gpio_port_t)&PORT_7) 
   41#  define GPIO_PORT_8   ((gpio_port_t)&PORT_8) 
   62#if defined(CPU_FAM_MSP430_F2XX_G2XX) 
   63    if (port >= (uintptr_t)(&
PORT_7)) {
 
   74#if defined(CPU_FAM_MSP430_F2XX_G2XX) 
   75    if (port >= (uintptr_t)(&
PORT_7)) {
 
   86#if defined(CPU_FAM_MSP430_F2XX_G2XX) 
   87    if (port >= (uintptr_t)(&
PORT_7)) {
 
   99#if defined(CPU_FAM_MSP430_F2XX_G2XX) 
  100    if (port >= (uintptr_t)(&
PORT_7)) {
 
  112#if defined(CPU_FAM_MSP430_F2XX_G2XX) 
  113    if (port >= (uintptr_t)(&
PORT_7)) {
 
  125#if defined(CPU_FAM_MSP430_F2XX_G2XX) 
  126    if (port >= (uintptr_t)(&
PORT_7)) {
 
  148#if defined(CPU_FAM_MSP430_F2XX_G2XX) 
  149    if (port >= (uintptr_t)(&
PORT_7)) {
 
  161#if defined(CPU_FAM_MSP430_F2XX_G2XX) 
  162    if (port >= (uintptr_t)(&
PORT_7)) {
 
  188#if defined(CPU_FAM_MSP430_F2XX_G2XX) 
  189    return (num > 0) && (num <= 8);
 
  191    return (num > 0) && (num <= 6);
 
static uint8_t gpio_get_pin_num(gpio_t pin)
Extract the pin number from a gpio_t
 
static void gpio_ll_set(gpio_port_t port, uword_t mask)
Perform an reg |= mask operation on the I/O register of the port.
 
gpio_port_t gpio_port(uword_t num)
Get the gpio_port_t value of the port number num.
 
static gpio_port_t gpio_port_pack_addr(void *addr)
Pack a pointer into a gpio_port_t.
 
static void gpio_ll_switch_dir_output(gpio_port_t port, uword_t pins)
Turn GPIO pins specified by pins (obtained from gpio_ll_prepare_switch_dir) to outputs.
 
static void gpio_ll_switch_dir_input(gpio_port_t port, uword_t pins)
Turn GPIO pins specified by pins (obtained from gpio_ll_prepare_switch_dir) to inputs.
 
static uword_t gpio_ll_read(gpio_port_t port)
Get the current input value of all GPIO pins of the given port as bitmask.
 
static gpio_port_t gpio_get_port(gpio_t pin)
Extract the gpio_port_t from a gpio_t
 
uword_t gpio_port_num(gpio_port_t port)
Get the number of the GPIO port port refers to.
 
static void * gpio_port_unpack_addr(gpio_port_t port)
Extract a data pointer that was packed by gpio_port_pack_addr.
 
static bool is_gpio_port_num_valid(uint_fast8_t num)
Check if the given number is a valid argument for gpio_port.
 
static uword_t gpio_ll_read_output(gpio_port_t port)
Get the current output value of all GPIO pins of the given port as bitmask.
 
static void gpio_ll_clear(gpio_port_t port, uword_t mask)
Perform an reg &= ~mask operation on the I/O register of the port.
 
static void gpio_ll_toggle(gpio_port_t port, uword_t mask)
Perform an reg ^= mask operation on the I/O register of the port.
 
static void gpio_ll_write(gpio_port_t port, uword_t state)
Perform a masked write operation on the I/O register of the port.
 
uintptr_t gpio_port_t
GPIO port type.
 
uint< NUM > _t uword_t
Word sized unsigned integer.
 
Texas Instruments MSP430 specific code.
 
msp430_port_p7_p8_t PORT_7
Register map of GPIO PORT 7.
 
#define RAMSTART
Lowest address of the RAM, peripherals are below.
 
GPIO Port 7/8 (different register layout than Ports 1-6)
 
Common MSP GPIO Port Registers.