EPPL  0.1 alpha
 All Files Typedefs Groups Pages
eppl_avr8_mapout.h File Reference

Embedded Port Pins Library - part of internal porting files. More...

Go to the source code of this file.

Macros

#define EPPL_avr8_mapOutMaskedPins(pout, value, pos, pin, mask)   (*(pout)) ^= (((*(pout)) ^ EPPL_avr8_LRSH(value, pin, pos)) & ((mask)<<(pin)))
 Mapping selected group of bits to right place in output value. More...
 
#define EPPL_avr8_mapOutTempPinsNear1(pout, val, flags, pos, pin)
 Single bit mapping. More...
 
#define EPPL_avr8_mapOutTempPinsNear2(pout, val, flags, pos, pin)   EPPL_avr8_mapOutMaskedPins(pout, val, pos, EPPL_PINNR(pin), 0x03)
 
#define EPPL_avr8_mapOutTempPinsNear3(pout, val, flags, pos, pin)   EPPL_avr8_mapOutMaskedPins(pout, val, pos, EPPL_PINNR(pin), 0x07)
 
#define EPPL_avr8_mapOutTempPinsNear4(pout, val, flags, pos, pin)   EPPL_avr8_mapOutMaskedPins(pout, val, pos, EPPL_PINNR(pin), 0x0f)
 
#define EPPL_avr8_mapOutTempPinsNear5(pout, val, flags, pos, pin)   EPPL_avr8_mapOutMaskedPins(pout, val, pos, EPPL_PINNR(pin), 0x1f)
 
#define EPPL_avr8_mapOutTempPinsNear6(pout, val, flags, pos, pin)   EPPL_avr8_mapOutMaskedPins(pout, val, pos, EPPL_PINNR(pin), 0x3f)
 
#define EPPL_avr8_mapOutTempPinsNear7(pout, val, flags, pos, pin)   EPPL_avr8_mapOutMaskedPins(pout, val, pos, EPPL_PINNR(pin), 0x7f)
 
#define EPPL_avr8_mapOutTempPinsNear8(pout, val, flags, pos, pin)   EPPL_avr8_mapOutMaskedPins(pout, val, pos, EPPL_PINNR(pin), 0xff)
 
#define eppl_avr8_mapOutToOnePort(pout, port, val, flags, pins...)   EPPL_LC(eppl_avr8_mapOutToOnePort, EPPL_COUNTARGS(pins))(pout, port, val, flags, pins)
 Mapping macro for single register in port. More...
 
#define EPPL_avr8_generateMapOutToOnePortOpt(repeatcntd, flags, mode, val, pins...)
 Internal map out generate macro. More...
 
#define EPPL_avr8_generateMapOutToOnePort(repeatcntd, mode, val, pins...)   EPPL_avr8_generateMapOutToOnePortOpt(repeatcntd, __builtin_constant_p(val) ? EPPL_avr8_mapOutFlag_const : 0, mode, val, pins)
 Map value out generate macro. More...
 
#define EPPL_avr8_MapOutIsAtomicAccessReg(reg, port, pinconfigs...)
 Macro that checks if access to register is going to be atomic instruction even if we do not know target state. More...
 
#define EPPL_avr8_MapOutIsSafe(mode, port, pins...)
 Macro for safe operation checking. More...
 
Group of macros for mapping out bits that are near each other

Simple macros for mapping single bits. The number in macro name points how many bits there are next each other to map out.

#define EPPL_avr8_mapOutFlag_direct   1
 Direct access flag. More...
 
#define EPPL_avr8_mapOutFlag_const   2
 Constant value flag. More...
 
Macros for mode analysing

Set of macros that converts mode information on data allowing us to set PORT and DDR registers.

#define EPPL_avr8_mapOutModify_DDR(m)   xEPPL_avr8_mapOutModify_DDR(EPPL_avr8_modeGet(m))
 Check if mode modifies DDR register. More...
 
#define EPPL_avr8_mapOutModify_PORT(m)   xEPPL_avr8_mapOutModify_PORT(EPPL_avr8_modeGet(m))
 Check if mode modifies PORT register. More...
 
#define EPPL_avr8_mapOutNegate_DDR(m)   xEPPL_avr8_mapOutNegate_DDR(EPPL_avr8_modeGet(m))
 Check if in selected mode value in DDR is negated. More...
 
#define EPPL_avr8_mapOutNegate_PORT(m)   xEPPL_avr8_mapOutNegate_PORT(EPPL_avr8_modeGet(m))
 Check if in selected mode value in PORT is negated. More...
 
#define xEPPL_avr8_mapOutModify_DDR(m)   ( ((m)==EPPL_mode_outOC) || ((m)==EPPL_mode_outOE) || ((m)==EPPL_mode_outPU) )
 
#define xEPPL_avr8_mapOutModify_PORT(m)   ( ((m)==EPPL_mode_outPP) || ((m)==EPPL_mode_outOE) || ((m)==EPPL_mode_outPU) )
 
#define xEPPL_avr8_mapOutNegate_DDR(m)   ( ((m)==EPPL_mode_outOC) || ((m)==EPPL_mode_outPU) )
 
#define xEPPL_avr8_mapOutNegate_PORT(m)   ( 0 )
 

Functions

Mapping functions

Functions for mapping value to pins. This functions takes value and list of pins for out mapping.

Do not call it directly. Use eppl_avr8_mapOutToOnePort macro, that counts number of pins for mapping and calls right function.

static void eppl_avr8_mapOutToOnePort1 (uint8_t *pout, uint8_t port, uint8_t val, uint8_t flags, eppl_pin_t pin1) __attribute__((always_inline))
 
static void eppl_avr8_mapOutToOnePort2 (uint8_t *pout, uint8_t port, uint8_t val, uint8_t flags, eppl_pin_t pin1, eppl_pin_t pin2) __attribute__((always_inline))
 
static void eppl_avr8_mapOutToOnePort3 (uint8_t *pout, uint8_t port, uint8_t val, uint8_t flags, eppl_pin_t pin1, eppl_pin_t pin2, eppl_pin_t pin3) __attribute__((always_inline))
 
static void eppl_avr8_mapOutToOnePort4 (uint8_t *pout, uint8_t port, uint8_t val, uint8_t flags, eppl_pin_t pin1, eppl_pin_t pin2, eppl_pin_t pin3, eppl_pin_t pin4) __attribute__((always_inline))
 
static void eppl_avr8_mapOutToOnePort5 (uint8_t *pout, uint8_t port, uint8_t val, uint8_t flags, eppl_pin_t pin1, eppl_pin_t pin2, eppl_pin_t pin3, eppl_pin_t pin4, eppl_pin_t pin5) __attribute__((always_inline))
 
static void eppl_avr8_mapOutToOnePort6 (uint8_t *pout, uint8_t port, uint8_t val, uint8_t flags, eppl_pin_t pin1, eppl_pin_t pin2, eppl_pin_t pin3, eppl_pin_t pin4, eppl_pin_t pin5, eppl_pin_t pin6) __attribute__((always_inline))
 
static void eppl_avr8_mapOutToOnePort7 (uint8_t *pout, uint8_t port, uint8_t val, uint8_t flags, eppl_pin_t pin1, eppl_pin_t pin2, eppl_pin_t pin3, eppl_pin_t pin4, eppl_pin_t pin5, eppl_pin_t pin6, eppl_pin_t pin7) __attribute__((always_inline))
 
static void eppl_avr8_mapOutToOnePort8 (uint8_t *pout, uint8_t port, uint8_t val, uint8_t flags, eppl_pin_t pin1, eppl_pin_t pin2, eppl_pin_t pin3, eppl_pin_t pin4, eppl_pin_t pin5, eppl_pin_t pin6, eppl_pin_t pin7, eppl_pin_t pin8) __attribute__((always_inline))
 

Detailed Description

Embedded Port Pins Library - part of internal porting files.

Author
Radoslaw Koppel <r.koppel@k-el.com>
Date
2013 File that contains macros and functions that allows mapping out variable
See Also
<eppl_avr8_mapout>