Files

file  pins.h
 Kubos-HAL-MSP430F5529 - GPIO pin defs.
 
file  gpio.c
 Kubos-HAL-MSP430F5529 - GPIO module.
 

Data Structures

struct  KPinDesc
 Struct which contains gpio details (dir/out/in/pull pins and bit) More...
 

Enumerations

enum  KPin {
  P10 = 0, P11, P12, P13,
  P14, P15, P16, P20,
  P21, P22, P23, P24,
  P25, P26, P27, P30,
  P31, P32, P33, P34,
  P35, P36, P37, P40,
  P41, P42, P43, P44,
  P45, P47, P60, P61,
  P62, P63, P64, P65,
  P66, P70, P74, P81,
  P82
}
 Enum containing gpios currently setup. More...
 

Functions

void k_gpio_init (int pin, KGPIOMode mode, KGPIOPullup pullup)
 Initialize gpio pin to specified mode. More...
 
unsigned int k_gpio_read (int pin)
 Read in gpio pin. More...
 
void k_gpio_write (int pin, unsigned int val)
 Write to gpio pin. More...
 

Variables

volatile uint8_t * KPinDesc::dir_pin
 PxDIR. More...
 
volatile uint8_t * KPinDesc::out_pin
 PxOUT. More...
 
volatile uint8_t * KPinDesc::in_pin
 PxIN. More...
 
volatile uint8_t * KPinDesc::pull_pin
 PxREN. More...
 
uint8_t KPinDesc::bit
 

Enumeration Type Documentation

enum KPin

Enum containing gpios currently setup.

Note - This describes digital pins exposed on the MSP430F5529 launchpad.

Enumerator
P10 
P11 
P12 
P13 
P14 
P15 
P16 
P20 
P21 
P22 
P23 
P24 
P25 
P26 
P27 
P30 
P31 
P32 
P33 
P34 
P35 
P36 
P37 
P40 
P41 
P42 
P43 
P44 
P45 
P47 
P60 
P61 
P62 
P63 
P64 
P65 
P66 
P70 
P74 
P81 
P82 

Function Documentation

void k_gpio_init ( int  pin,
KGPIOMode  mode,
KGPIOPullup  pullup 
)

Initialize gpio pin to specified mode.

I/O pin configuration described in MSP430x5xx Family Guide Section 12.2.4

Parameters
pin
mode
pullup
unsigned int k_gpio_read ( int  pin)

Read in gpio pin.

Parameters
pin
Returns
unsigned int value
void k_gpio_write ( int  pin,
unsigned int  val 
)

Write to gpio pin.

Parameters
pin
val

Variable Documentation

uint8_t KPinDesc::bit
volatile uint8_t* KPinDesc::dir_pin

PxDIR.

volatile uint8_t* KPinDesc::in_pin

PxIN.

volatile uint8_t* KPinDesc::out_pin

PxOUT.

volatile uint8_t* KPinDesc::pull_pin

PxREN.