gusimplewhiteboard
wb_io_pins.h File Reference
#include <gu_util.h>
#include <gusimplewhiteboard/gusimplewhiteboard.h>
Include dependency graph for wb_io_pins.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wb_io_pins
 Simulated I/O pins. More...
 

Macros

#define IO_PIN_BYTE_SIZE   (sizeof(gu_simple_message))
 bytes to occupy More...
 
#define IO_PIN_BIT_SIZE   (IO_PIN_BYTE_SIZE*8)
 bits available More...
 
#define IO_PIN_CLR(s, n)   ((s)->_pins[(n)/8] &=~(1<<((n)%8)))
 
#define IO_PIN_SET(s, n)   ((s)->_pins[(n)/8] |= (1<<((n)%8)))
 
#define IO_PIN_GET(s, n)   ((((s)->_pins[(n)/8]) & (1<<((n)%8))) != 0)
 

Macro Definition Documentation

◆ IO_PIN_BIT_SIZE

#define IO_PIN_BIT_SIZE   (IO_PIN_BYTE_SIZE*8)

bits available

Definition at line 65 of file wb_io_pins.h.

◆ IO_PIN_BYTE_SIZE

#define IO_PIN_BYTE_SIZE   (sizeof(gu_simple_message))

bytes to occupy

Definition at line 64 of file wb_io_pins.h.

◆ IO_PIN_CLR

#define IO_PIN_CLR (   s,
 
)    ((s)->_pins[(n)/8] &=~(1<<((n)%8)))

Definition at line 67 of file wb_io_pins.h.

◆ IO_PIN_GET

#define IO_PIN_GET (   s,
 
)    ((((s)->_pins[(n)/8]) & (1<<((n)%8))) != 0)

Definition at line 69 of file wb_io_pins.h.

◆ IO_PIN_SET

#define IO_PIN_SET (   s,
 
)    ((s)->_pins[(n)/8] |= (1<<((n)%8)))

Definition at line 68 of file wb_io_pins.h.