Serial Wombat 4A and 4B Firmware
Classes | Macros | Typedefs | Functions | Variables
pinRegisters.h File Reference
#include <stdint.h>

Go to the source code of this file.

Classes

union  _pin_register_t
 
struct  _pin_register_t::generic_n
 A generic descriptor, typically used to access the buffer and mode variables. More...
 

Macros

#define BYTES_PER_PIN_REGISTER   20
 
#define BUILD_BUG_ON(condition)   ((void)sizeof(char[1 - 2*!!(condition)]))
 Awesome way to check structure sizes at build time. More...
 
#define USE_BUFFERED_PIN_REGISTER
 
#define CurrentPinRegister   (&pinRegisterBuffer)
 

Typedefs

typedef union _pin_register_t pinRegister_t
 

Functions

void CopyFromArrayToPinBuffer (void)
 
void CopyFromPinBufferToArray (void)
 
void SetBuffer (uint8_t pin, uint16_t value)
 
uint16_t GetBuffer (uint8_t pin)
 
void SetMode (uint8_t pin, uint8_t mode)
 
uint8_t GetMode (uint8_t pin)
 

Variables

pinRegister_t PinUpdateRegisters [NUMBER_OF_TOTAL_PINS]
 
pinRegister_t pinRegisterBuffer
 

Macro Definition Documentation

◆ BUILD_BUG_ON

#define BUILD_BUG_ON (   condition)    ((void)sizeof(char[1 - 2*!!(condition)]))

Awesome way to check structure sizes at build time.

See https://scaryreasoner.wordpress.com/2009/02/28/checking-sizeof-at-compile-time/

◆ BYTES_PER_PIN_REGISTER

#define BYTES_PER_PIN_REGISTER   20

◆ CurrentPinRegister

#define CurrentPinRegister   (&pinRegisterBuffer)

◆ USE_BUFFERED_PIN_REGISTER

#define USE_BUFFERED_PIN_REGISTER

Typedef Documentation

◆ pinRegister_t

Function Documentation

◆ CopyFromArrayToPinBuffer()

void CopyFromArrayToPinBuffer ( void  )

◆ CopyFromPinBufferToArray()

void CopyFromPinBufferToArray ( void  )

◆ GetBuffer()

uint16_t GetBuffer ( uint8_t  pin)

◆ GetMode()

uint8_t GetMode ( uint8_t  pin)

◆ SetBuffer()

void SetBuffer ( uint8_t  pin,
uint16_t  value 
)

◆ SetMode()

void SetMode ( uint8_t  pin,
uint8_t  mode 
)

Variable Documentation

◆ pinRegisterBuffer

pinRegister_t pinRegisterBuffer

◆ PinUpdateRegisters

pinRegister_t PinUpdateRegisters[NUMBER_OF_TOTAL_PINS]