Sungwoo Kim
/
HydraulicControlBoard_Rainbow_v1_2_copy
2011
Diff: setting.h
- Revision:
- 0:51c43836c1d7
- Child:
- 2:a1c0a37df760
diff -r 000000000000 -r 51c43836c1d7 setting.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/setting.h Wed Aug 14 08:13:36 2019 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" +#include "FastPWM.h" + +extern DigitalOut check; +extern DigitalOut check_2; +extern AnalogOut dac_1; +extern AnalogOut dac_2; + +// pwm +#define PIN_V PB_7 +#define PIN_W PB_6 +//#define PWM_ARR 0x465 // loop 80k, pwm 40k +#define PWM_ARR 0x8CA // loop 40k, pwm 20k +extern float dtc_v; +extern float dtc_w; + +// I2C +extern I2C i2c; // SDA, SCL (for K22F) +extern const int i2c_slave_addr1; +extern unsigned int value; // 10bit output of reading sensor AS5510 + +// SPI +extern SPI eeprom; //(SPI_MOSI, SPI_MISO, SPI_SCK); +extern DigitalOut eeprom_cs; +extern SPI enc; +extern DigitalOut enc_cs; + +// UART +extern Serial pc; //Serial pc(PA_9,PA_10); _ UART \ No newline at end of file