![]() |
Repetier-Firmware
0.91
|
#include <HAL.h>
Public Member Functions | |
HAL () | |
virtual | ~HAL () |
Static Public Member Functions | |
static void | hwSetup (void) |
static uint16_t | integerSqrt (long a) |
static long | Div4U2U (unsigned long a, unsigned int b) |
Optimized division. | |
static unsigned long | U16SquaredToU32 (unsigned int val) |
static unsigned int | ComputeV (long timer, long accel) |
static unsigned long | mulu16xu16to32 (unsigned int a, unsigned int b) |
static unsigned int | mulu6xu16shift16 (unsigned int a, unsigned int b) |
static void | digitalWrite (uint8_t pin, uint8_t value) |
static uint8_t | digitalRead (uint8_t pin) |
static void | pinMode (uint8_t pin, uint8_t mode) |
static long | CPUDivU2 (unsigned int divisor) |
approximates division of F_CPU/divisor | |
static void | delayMicroseconds (unsigned int delayUs) |
static void | delayMilliseconds (unsigned int delayMs) |
static void | tone (uint8_t pin, int duration) |
static void | noTone (uint8_t pin) |
static void | eprSetByte (unsigned int pos, uint8_t value) |
static void | eprSetInt16 (unsigned int pos, int16_t value) |
static void | eprSetInt32 (unsigned int pos, int32_t value) |
static void | eprSetFloat (unsigned int pos, float value) |
static uint8_t | eprGetByte (unsigned int pos) |
static int16_t | eprGetInt16 (unsigned int pos) |
static int32_t | eprGetInt32 (unsigned int pos) |
static float | eprGetFloat (unsigned int pos) |
static void | allowInterrupts () |
static void | forbidInterrupts () |
static unsigned long | timeInMilliseconds () |
static char | readFlashByte (PGM_P ptr) |
static void | serialSetBaudrate (long baud) |
static bool | serialByteAvailable () |
static uint8_t | serialReadByte () |
static void | serialWriteByte (char b) |
static void | serialFlush () |
static void | setupTimer () |
static void | showStartReason () |
static int | getFreeRam () |
static void | resetHardware () |
static void | spiBegin () |
static void | spiInit (uint8_t spiRate) |
static uint8_t | spiReceive (uint8_t send=0xff) |
static void | spiReadBlock (uint8_t *buf, size_t nbyte) |
static void | spiSend (uint8_t b) |
static void | spiSend (const uint8_t *buf, size_t n) |
static | __attribute__ ((always_inline)) void spiSendBlock(uint8_t token |
static unsigned char | i2cStart (unsigned char address) |
static void | i2cStartWait (unsigned char address) |
static void | i2cStop (void) |
static unsigned char | i2cWrite (unsigned char data) |
static unsigned char | i2cReadAck (void) |
static unsigned char | i2cReadNak (void) |
static void | startWatchdog () |
static void | stopWatchdog () |
static void | pingWatchdog () |
static float | maxExtruderTimerFrequency () |
static void | analogStart () |
HAL | ( | ) |
~HAL | ( | ) | [virtual] |
static __attribute__ | ( | (always_inline) | ) | [inline, static] |
static void allowInterrupts | ( | ) | [inline, static] |
void analogStart | ( | ) | [static] |
static unsigned int ComputeV | ( | long | timer, |
long | accel | ||
) | [inline, static] |
long CPUDivU2 | ( | unsigned int | divisor | ) | [static] |
approximates division of F_CPU/divisor
In the stepper interrupt a division is needed, which is a slow operation. The result is used for timer calculation where small errors are ok. This function uses lookup tables to find a fast approximation of the result.
static void delayMicroseconds | ( | unsigned int | delayUs | ) | [inline, static] |
static void delayMilliseconds | ( | unsigned int | delayMs | ) | [inline, static] |
static uint8_t digitalRead | ( | uint8_t | pin | ) | [inline, static] |
static void digitalWrite | ( | uint8_t | pin, |
uint8_t | value | ||
) | [inline, static] |
static long Div4U2U | ( | unsigned long | a, |
unsigned int | b | ||
) | [inline, static] |
Optimized division.
Normally the C compiler will compute a long/long division, which takes ~670 Ticks. This version is optimized for a 16 bit dividend and recognises the special cases of a 24 bit and 16 bit dividend, which offen, but not always occur in updating the interval.
static uint8_t eprGetByte | ( | unsigned int | pos | ) | [inline, static] |
static float eprGetFloat | ( | unsigned int | pos | ) | [inline, static] |
static int16_t eprGetInt16 | ( | unsigned int | pos | ) | [inline, static] |
static int32_t eprGetInt32 | ( | unsigned int | pos | ) | [inline, static] |
static void eprSetByte | ( | unsigned int | pos, |
uint8_t | value | ||
) | [inline, static] |
static void eprSetFloat | ( | unsigned int | pos, |
float | value | ||
) | [inline, static] |
static void eprSetInt16 | ( | unsigned int | pos, |
int16_t | value | ||
) | [inline, static] |
static void eprSetInt32 | ( | unsigned int | pos, |
int32_t | value | ||
) | [inline, static] |
static void forbidInterrupts | ( | ) | [inline, static] |
int getFreeRam | ( | ) | [static] |
static void hwSetup | ( | void | ) | [inline, static] |
unsigned char i2cReadAck | ( | void | ) | [static] |
unsigned char i2cReadNak | ( | void | ) | [static] |
unsigned char i2cStart | ( | unsigned char | address | ) | [static] |
void i2cStartWait | ( | unsigned char | address | ) | [static] |
void i2cStop | ( | void | ) | [static] |
unsigned char i2cWrite | ( | unsigned char | data | ) | [static] |
uint16_t integerSqrt | ( | long | a | ) | [static] |
static float maxExtruderTimerFrequency | ( | ) | [inline, static] |
static unsigned long mulu16xu16to32 | ( | unsigned int | a, |
unsigned int | b | ||
) | [inline, static] |
static unsigned int mulu6xu16shift16 | ( | unsigned int | a, |
unsigned int | b | ||
) | [inline, static] |
static void noTone | ( | uint8_t | pin | ) | [inline, static] |
static void pingWatchdog | ( | ) | [inline, static] |
static void pinMode | ( | uint8_t | pin, |
uint8_t | mode | ||
) | [inline, static] |
static char readFlashByte | ( | PGM_P | ptr | ) | [inline, static] |
void resetHardware | ( | ) | [static] |
static bool serialByteAvailable | ( | ) | [inline, static] |
static void serialFlush | ( | ) | [inline, static] |
static uint8_t serialReadByte | ( | ) | [inline, static] |
static void serialSetBaudrate | ( | long | baud | ) | [inline, static] |
static void serialWriteByte | ( | char | b | ) | [inline, static] |
void setupTimer | ( | ) | [static] |
void showStartReason | ( | ) | [static] |
static void spiBegin | ( | ) | [inline, static] |
static void spiInit | ( | uint8_t | spiRate | ) | [inline, static] |
static void spiReadBlock | ( | uint8_t * | buf, |
size_t | nbyte | ||
) | [inline, static] |
static uint8_t spiReceive | ( | uint8_t | send = 0xff | ) | [inline, static] |
static void spiSend | ( | uint8_t | b | ) | [inline, static] |
static void spiSend | ( | const uint8_t * | buf, |
size_t | n | ||
) | [inline, static] |
static void startWatchdog | ( | ) | [inline, static] |
static void stopWatchdog | ( | ) | [inline, static] |
static unsigned long timeInMilliseconds | ( | ) | [inline, static] |
static void tone | ( | uint8_t | pin, |
int | duration | ||
) | [inline, static] |
static unsigned long U16SquaredToU32 | ( | unsigned int | val | ) | [inline, static] |