heat control
r71
|
#include <stdint.h>
#include <stdlib.h>
#include <avr/eeprom.h>
#include <avr/interrupt.h>
#include <avr/io.h>
#include "init.h"
Go to the source code of this file.
Data Structures | |
struct | MEASSET |
struct | HCREC |
struct | ENG_TIMER |
struct | CTRLSET |
Macros | |
#define | INC_TSEND_INIT 0 |
#define | TINY_26 26 |
#define | TINY_861 861 |
#define | TINYCTRL TINY_861 |
#define | ADC_SR ADCSRA |
#define | AC_SR ACSRA |
#define | EE_AR EEARL |
#define | TCN_T0 TCNT0L |
#define | TCC_R0 TCCR0B |
#define | SP_L SPL |
#define | AD_FR ADATE |
#define | USI_SIF USICIF |
#define | EEM_WE EEMPE |
#define | EE_WE EEPE |
#define | CTC0 WGM00 |
#define | CHAR int8_t |
#define | UCHAR uint8_t |
#define | INT int16_t |
#define | UINT uint16_t |
#define | LINT int32_t |
#define | ULINT uint32_t |
#define | FALSE 0 |
#define | TRUE 1 |
#define | BOOL _Bool |
#define | INVALID_VAL_U16 0xFFFF |
#define | INVALID_VAL_I16 -32768 |
#define | OP_MODES 7 |
#define | NUM_MS 35 |
#define | IV_MEAS 1 |
#define | NUM_HR 70 |
#define | IV_SHOW 1 |
#define | OFF_NEAR 1 |
#define | OFF_FAR 100 |
#define | DIR_UP 1 |
#define | DIR_DOWN -1 |
Typedefs | |
typedef enum DATTYPE | DATTYPE |
typedef enum OP_MODE | OP_MODE |
typedef enum ENG_MODE | ENG_MODE |
typedef struct MEASSET | MEASSET |
typedef struct HCREC | HCREC |
typedef enum CTRL_MODE | CTRL_MODE |
typedef enum DEB_STATE | DEB_STATE |
typedef enum BTN_CODE | BTN_CODE |
typedef struct ENG_TIMER | ENG_TIMER |
typedef struct CTRLSET | CTRLSET |
Enumerations | |
enum | DATTYPE { DT_UCHAR = 0, DT_CHAR, DT_UINT, DT_INT, DT_FLOAT, DT_STRING, DT_TIME } |
enum | OP_MODE { OM_TMPCTRL = 0, OM_ENGTEST, OM_SHMEAS, OM_CONTI, OM_SENDER, OM_MXPOS, OM_SETUP } |
enum | ENG_MODE { EM_STOP = 0, EM_CCW, EM_CW } |
enum | CTRL_MODE { CM_DENY = 0, CM_MEAS, CM_REC, CM_FOR, CM_SHDN } |
enum | DEB_STATE { DS_DEBOUNCED = 0, DS_DEBOUNCING } |
enum | BTN_CODE { BC_NONE = 0, BC_DN, BC_UP, BC_DNUP, BC_DNUP_L } |
Functions | |
UINT | SetLimitValue (UINT val, DATTYPE dt, CHAR dir, INT min, INT max) |
limiting values to constraints More... | |
UCHAR | FlipByte (UCHAR x) |
reverse bits in a byte (make it RS232 conform for transmission) More... | |
UCHAR * | GetCtrlMode (CTRL_MODE ctm, UCHAR *buf) |
#define ADC_SR ADCSRA |
controller dependent meta register naming
Definition at line 43 of file types.h.
Referenced by AdcInit(), and StartAdcConversion().
#define CHAR int8_t |
data type support for signed char
Definition at line 69 of file types.h.
Referenced by CalcPrevIndex(), main(), and SetLimitValue().
#define CTC0 WGM00 |
Definition at line 53 of file types.h.
Referenced by TimerInit().
#define DIR_DOWN -1 |
#define DIR_UP 1 |
#define FALSE 0 |
data type support for boolean false
Definition at line 93 of file types.h.
Referenced by DecodeButton(), GetSenderValues(), ISR(), main(), and PlausibilityCheck().
#define INC_TSEND_INIT 0 |
control application data inclusion INC_TSEND_INIT = 1 -> project is being built for tsend, for heat control otherwise
Definition at line 13 of file types.h.
Referenced by ProcessNextConversion().
#define INT int16_t |
data type support for signed integer
Definition at line 77 of file types.h.
Referenced by DoControl(), FindForeRun(), and SetLimitValue().
#define INVALID_VAL_I16 -32768 |
#define INVALID_VAL_U16 0xFFFF |
invalid value unsigned integer
Definition at line 105 of file types.h.
Referenced by CalcAdcTemp(), CalcSupplyVoltage(), DoControl(), FindForeRun(), GetSenderValues(), Init(), main(), PlausibilityCheck(), and ProcessNextConversion().
#define IV_SHOW 1 |
#define LINT int32_t |
#define NUM_HR 70 |
number of heating curve recordings
Definition at line 249 of file types.h.
Referenced by DoControl(), and main().
#define NUM_MS 35 |
#define OFF_FAR 100 |
#define OFF_NEAR 1 |
#define OP_MODES 7 |
#define TCC_R0 TCCR0B |
Definition at line 47 of file types.h.
Referenced by TimerInit().
#define TCN_T0 TCNT0L |
Definition at line 46 of file types.h.
Referenced by EnableUsi().
#define TINY_26 26 |
#define TINYCTRL TINY_861 |
#define TRUE 1 |
data type support for boolean true
Definition at line 97 of file types.h.
Referenced by DecodeButton(), DoControl(), GetSenderValues(), ISR(), main(), PlausibilityCheck(), PrintPage(), SetMux(), SetupInit(), and StartAdcConversion().
#define UCHAR uint8_t |
data type support for unsigned char
Definition at line 73 of file types.h.
Referenced by _exp10(), CalcCrc(), CalcPrevIndex(), DecodeButton(), DoControl(), DoSetup(), FindForeRun(), GetCtrlMode(), GetSenderValues(), GetSetupValues(), Init(), ISR(), main(), ntofa(), PlausibilityCheck(), PrintPage(), SetLimitValue(), SetSetupValues(), TestButton(), Welcome(), WriteCtrlMode(), WriteSetupGroup(), WriteSetupValue(), and WriteValue().
#define UINT uint16_t |
data type support for unsigned integer
Definition at line 81 of file types.h.
Referenced by _exp10(), CalcAdcTemp(), CalcSupplyVoltage(), DecodeButton(), DoControl(), ISR(), main(), ntofa(), PlausibilityCheck(), and SetLimitValue().
#define ULINT uint32_t |
enum BTN_CODE |
enum CTRL_MODE |
enum DATTYPE |
enum DEB_STATE |
enum ENG_MODE |
enum OP_MODE |
operation modes
resolve a control mode to hrf string
ctm | control mode to resolve |
buf | resolved control mode, must have at least 5 bytes allocated |
Definition at line 65 of file types.c.
References CM_DENY, CM_FOR, CM_MEAS, CM_REC, CM_SHDN, and UCHAR.
Referenced by main().
limiting values to constraints
val | value to be limited |
dt | data type of value val |
dir | direction (increment=1 or decrement=-1) of value modification |
min | lower value limit |
max | upper value limit |
Definition at line 13 of file types.c.
References CHAR, DT_CHAR, DT_INT, DT_UCHAR, DT_UINT, INT, OFF_FAR, OFF_NEAR, UCHAR, and UINT.
Referenced by DoSetup(), and main().