|
MHVLib
20111227
An efficiency oriented runtime library for AVR microcontrollers
|
#include <MHV_io.h>Go to the source code of this file.
Classes | |
| class | MHV_Shifter |
Defines | |
| #define | MHV_SHIFT_DELAY |
| #define | SHIFTOUT_BYTE_LOOP (mhv_shift_i = 0; mhv_shift_i < 8; mhv_shift_i++) |
| #define | MHV_BIT_1 _BV(0) |
| #define | MHV_BIT_2 _BV(1) |
| #define | MHV_BIT_3 _BV(2) |
| #define | MHV_BIT_4 _BV(3) |
| #define | MHV_BIT_5 _BV(4) |
| #define | MHV_BIT_6 _BV(5) |
| #define | MHV_BIT_7 _BV(6) |
| #define | MHV_BIT_8 _BV(7) |
| #define | MHV_SHIFTER_CLOCKED_RISING_CREATE(name) |
| #define | MHV_SHIFTER_CLOCKED_FALLING_CREATE(name) |
Functions | |
| void | mhv_shiftout_byte_lsb (MHV_PIN *data, MHV_PIN *clock, uint8_t byte) |
| void | mhv_shiftout_byte_msb (MHV_PIN *data, MHV_PIN *clock, uint8_t byte) |
| #define MHV_BIT_1 _BV(0) |
Definition at line 58 of file MHV_Shifter.h.
| #define MHV_BIT_2 _BV(1) |
Definition at line 59 of file MHV_Shifter.h.
| #define MHV_BIT_3 _BV(2) |
Definition at line 60 of file MHV_Shifter.h.
| #define MHV_BIT_4 _BV(3) |
Definition at line 61 of file MHV_Shifter.h.
| #define MHV_BIT_5 _BV(4) |
Definition at line 62 of file MHV_Shifter.h.
| #define MHV_BIT_6 _BV(5) |
Definition at line 63 of file MHV_Shifter.h.
| #define MHV_BIT_7 _BV(6) |
Definition at line 64 of file MHV_Shifter.h.
| #define MHV_BIT_8 _BV(7) |
Definition at line 65 of file MHV_Shifter.h.
| #define MHV_SHIFT_DELAY |
Definition at line 43 of file MHV_Shifter.h.
| #define MHV_SHIFTER_CLOCKED_FALLING_CREATE | ( | name | ) |
class MHV_Shifter_ ## name : public MHV_Shifter { \ public: \ void shiftOut(uint8_t *shiftData, uint8_t shiftLength); \ void shiftOut(uint8_t *shiftData, uint16_t shiftLength); \ void shiftOut(uint8_t *shiftData, uint8_t dataLength, uint16_t elements); \ }; \ void MHV_Shifter_ ## name::shiftOut(uint8_t *shiftData, uint8_t shiftLength) { \ MHV_SHIFTOUT_ARRAY_CLOCKED_FALLING(shiftData, shiftLength); \ } \ void MHV_Shifter_ ## name::shiftOut(uint8_t *shiftData, uint16_t shiftLength) { \ MHV_SHIFTOUT_ARRAY_CLOCKED_FALLING(shiftData, shiftLength); \ } \ void MHV_Shifter_ ## name::shiftOut(uint8_t *shiftData, uint8_t dataLength, uint16_t elements) { \ MHV_SHIFTOUT_ELEMENTS_CLOCKED_FALLING(shiftData, dataLength, elements); \ } \ MHV_Shifter_ ## name name;
Create a new shifter for devices that read on the falling edge The MHV_SHIFT_WRITECLOCK & MHV_SHIFT_WRITEDATA macros should be defined in advance
| name | the name of the object to create |
Definition at line 510 of file MHV_Shifter.h.
| #define MHV_SHIFTER_CLOCKED_RISING_CREATE | ( | name | ) |
class MHV_Shifter_ ## name : public MHV_Shifter { \ public: \ void shiftOut(uint8_t *shiftData, uint8_t shiftLength); \ void shiftOut(uint8_t *shiftData, uint16_t shiftLength); \ void shiftOut(uint8_t *shiftData, uint8_t dataLength, uint16_t elements); \ }; \ void MHV_Shifter_ ## name::shiftOut(uint8_t *shiftData, uint8_t shiftLength) { \ MHV_SHIFTOUT_ARRAY_CLOCKED_RISING(shiftData, shiftLength); \ } \ void MHV_Shifter_ ## name::shiftOut(uint8_t *shiftData, uint16_t shiftLength) { \ MHV_SHIFTOUT_ARRAY_CLOCKED_RISING(shiftData, shiftLength); \ } \ void MHV_Shifter_ ## name::shiftOut(uint8_t *shiftData, uint8_t dataLength, uint16_t elements) { \ MHV_SHIFTOUT_ELEMENTS_CLOCKED_RISING(shiftData, dataLength, elements); \ } \ MHV_Shifter_ ## name name;
Create a new shifter for devices that read on the rising edge The MHV_SHIFT_WRITECLOCK & MHV_SHIFT_WRITEDATA macros should be defined in advance
| name | the name of the object to create |
Definition at line 487 of file MHV_Shifter.h.
| #define SHIFTOUT_BYTE_LOOP (mhv_shift_i = 0; mhv_shift_i < 8; mhv_shift_i++) |
Definition at line 57 of file MHV_Shifter.h.
Definition at line 29 of file MHV_Shifter.cpp.
Definition at line 43 of file MHV_Shifter.cpp.