Bayley Wang
/
flash_configuration
flash based config testing
Defaults/config_pins.h@1:df6bbacb7bb9, 2017-03-02 (annotated)
- Committer:
- bwang
- Date:
- Thu Mar 02 07:04:47 2017 +0000
- Revision:
- 1:df6bbacb7bb9
- Parent:
- config_pins.h@0:941e150e78b6
now with configuration terminal!
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bwang | 0:941e150e78b6 | 1 | #ifndef __CONFIG_PINS_H |
bwang | 0:941e150e78b6 | 2 | #define __CONFIG_PINS_H |
bwang | 0:941e150e78b6 | 3 | |
bwang | 0:941e150e78b6 | 4 | #define PWMA PA_8 |
bwang | 0:941e150e78b6 | 5 | #define PWMB PA_9 |
bwang | 0:941e150e78b6 | 6 | #define PWMC PA_10 |
bwang | 0:941e150e78b6 | 7 | #define EN PB_15 |
bwang | 0:941e150e78b6 | 8 | |
bwang | 0:941e150e78b6 | 9 | #define IA PA_4 |
bwang | 0:941e150e78b6 | 10 | #define IB PB_0 |
bwang | 0:941e150e78b6 | 11 | |
bwang | 0:941e150e78b6 | 12 | #define TH_PIN PB_8 |
bwang | 0:941e150e78b6 | 13 | |
bwang | 0:941e150e78b6 | 14 | #define TH_LIMIT_LOW 1100 //uS |
bwang | 0:941e150e78b6 | 15 | #define TH_LIMIT_HIGH 1750 |
bwang | 0:941e150e78b6 | 16 | #define TH_LIMIT_CRAZY 2000 |
bwang | 0:941e150e78b6 | 17 | |
bwang | 0:941e150e78b6 | 18 | #define I_SCALE_RAW 25.0f //mv/A |
bwang | 0:941e150e78b6 | 19 | #define R_UP 12000.0f //ohms |
bwang | 0:941e150e78b6 | 20 | #define R_DOWN 3600.0f //ohms |
bwang | 0:941e150e78b6 | 21 | #define R_BIAS 3600.0f //ohms |
bwang | 0:941e150e78b6 | 22 | #define AVDD 3300.0f //mV |
bwang | 0:941e150e78b6 | 23 | |
bwang | 0:941e150e78b6 | 24 | #define I_OFFSET (AVDD * R_DOWN * R_UP / (R_DOWN * R_UP + R_BIAS * (R_DOWN + R_UP))) |
bwang | 0:941e150e78b6 | 25 | #define I_SCALE (R_BIAS * R_DOWN * I_SCALE_RAW / (R_DOWN * R_UP + R_BIAS * (R_DOWN + R_UP))) |
bwang | 0:941e150e78b6 | 26 | |
bwang | 0:941e150e78b6 | 27 | #define set_dtc(phase, value) *phase = (value) |
bwang | 0:941e150e78b6 | 28 | |
bwang | 0:941e150e78b6 | 29 | #endif |