auto-sync
This commit is contained in:
parent
457248ccf2
commit
00f56ab399
|
@ -1,4 +1,4 @@
|
|||
// this section was generated by config_definition.jar on Fri Jul 03 10:52:21 EDT 2015
|
||||
// this section was generated by config_definition.jar on Sun Jul 12 21:31:55 EDT 2015
|
||||
// begin
|
||||
#include "rusefi_types.h"
|
||||
typedef struct {
|
||||
|
@ -1222,7 +1222,19 @@ typedef struct {
|
|||
/**
|
||||
* offset 1748
|
||||
*/
|
||||
int unused3[102];
|
||||
int spi2SckMode;
|
||||
/**
|
||||
* offset 1752
|
||||
*/
|
||||
int spi2MosiMode;
|
||||
/**
|
||||
* offset 1756
|
||||
*/
|
||||
int spi2MisoMode;
|
||||
/**
|
||||
* offset 1760
|
||||
*/
|
||||
int unused3[99];
|
||||
/**
|
||||
* offset 2156
|
||||
*/
|
||||
|
@ -1433,4 +1445,4 @@ typedef struct {
|
|||
} persistent_config_s;
|
||||
|
||||
// end
|
||||
// this section was generated by config_definition.jar on Fri Jul 03 10:52:21 EDT 2015
|
||||
// this section was generated by config_definition.jar on Sun Jul 12 21:31:55 EDT 2015
|
||||
|
|
|
@ -641,7 +641,10 @@
|
|||
#define baroCorrRpmBins_offset_hex 684
|
||||
#define baroCorrTable_offset 1684
|
||||
#define baroCorrTable_offset_hex 694
|
||||
#define unused3_offset 1748
|
||||
#define spi2SckMode_offset 1748
|
||||
#define spi2MosiMode_offset 1752
|
||||
#define spi2MisoMode_offset 1756
|
||||
#define unused3_offset 1760
|
||||
#define targetVBatt_offset 2156
|
||||
#define alternatorOffAboveTps_offset 2160
|
||||
#define alternatorOffAboveTps_offset_hex 870
|
||||
|
|
|
@ -43,6 +43,7 @@ static NamedOutputPin intHold("HIP");
|
|||
static OutputPin hipCs;
|
||||
|
||||
extern pin_output_mode_e DEFAULT_OUTPUT;
|
||||
extern pin_output_mode_e OPENDRAIN_OUTPUT;
|
||||
|
||||
extern uint32_t lastExecutionCount;
|
||||
|
||||
|
@ -418,7 +419,7 @@ void initHip9011(Logging *sharedLogger) {
|
|||
|
||||
outputPinRegisterExt2("hip int/hold", &intHold, boardConfiguration->hip9011IntHoldPin,
|
||||
&boardConfiguration->hip9011IntHoldPinMode);
|
||||
outputPinRegisterExt2("hip CS", &hipCs, boardConfiguration->hip9011CsPin, &DEFAULT_OUTPUT);
|
||||
outputPinRegisterExt2("hip CS", &hipCs, boardConfiguration->hip9011CsPin, &OPENDRAIN_OUTPUT);
|
||||
|
||||
scheduleMsg(logger, "Starting HIP9011/TPIC8101 driver");
|
||||
spiStart(driver, &spicfg);
|
||||
|
|
|
@ -36,6 +36,7 @@ static GPIO_TypeDef *PORTS[] = { GPIOA, GPIOB, GPIOC, GPIOD, GPIOF};
|
|||
#endif
|
||||
|
||||
pin_output_mode_e DEFAULT_OUTPUT = OM_DEFAULT;
|
||||
pin_output_mode_e OPENDRAIN_OUTPUT = OM_OPENDRAIN;
|
||||
|
||||
static void outputPinRegisterExt(const char *msg, OutputPin *output, GPIO_TypeDef *port, uint32_t pin,
|
||||
pin_output_mode_e *outputMode) {
|
||||
|
|
|
@ -270,11 +270,15 @@ void turnOnSpi(spi_device_e device) {
|
|||
return; // already initialized
|
||||
isSpiInitialized[device] = true;
|
||||
if (device == SPI_DEVICE_1) {
|
||||
// todo: introduce a nice structure with all fields for same SPI
|
||||
#if STM32_SPI_USE_SPI1
|
||||
// scheduleMsg(&logging, "Turning on SPI1 pins");
|
||||
initSpiModule(&SPID1, getSckPin(device),
|
||||
getMisoPin(device),
|
||||
getMosiPin(device));
|
||||
getMosiPin(device),
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
#endif /* STM32_SPI_USE_SPI1 */
|
||||
}
|
||||
if (device == SPI_DEVICE_2) {
|
||||
|
@ -282,7 +286,10 @@ void turnOnSpi(spi_device_e device) {
|
|||
// scheduleMsg(&logging, "Turning on SPI2 pins");
|
||||
initSpiModule(&SPID2, getSckPin(device),
|
||||
getMisoPin(device),
|
||||
getMosiPin(device));
|
||||
getMosiPin(device),
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
#endif /* STM32_SPI_USE_SPI2 */
|
||||
}
|
||||
if (device == SPI_DEVICE_3) {
|
||||
|
@ -290,18 +297,24 @@ void turnOnSpi(spi_device_e device) {
|
|||
// scheduleMsg(&logging, "Turning on SPI3 pins");
|
||||
initSpiModule(&SPID3, getSckPin(device),
|
||||
getMisoPin(device),
|
||||
getMosiPin(device));
|
||||
getMosiPin(device),
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
#endif /* STM32_SPI_USE_SPI3 */
|
||||
}
|
||||
}
|
||||
|
||||
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,
|
||||
brain_pin_e mosi) {
|
||||
brain_pin_e mosi,
|
||||
int sckMode,
|
||||
int mosiMode,
|
||||
int misoMode) {
|
||||
|
||||
mySetPadMode2("SPI clock", sck, PAL_MODE_ALTERNATE(getSpiAf(driver)));
|
||||
mySetPadMode2("SPI clock", sck, PAL_MODE_ALTERNATE(getSpiAf(driver)) + sckMode);
|
||||
|
||||
mySetPadMode2("SPI master out", mosi, PAL_MODE_ALTERNATE(getSpiAf(driver)));
|
||||
mySetPadMode2("SPI master in ", miso, PAL_MODE_ALTERNATE(getSpiAf(driver)));
|
||||
mySetPadMode2("SPI master out", mosi, PAL_MODE_ALTERNATE(getSpiAf(driver)) + mosiMode);
|
||||
mySetPadMode2("SPI master in ", miso, PAL_MODE_ALTERNATE(getSpiAf(driver)) + misoMode);
|
||||
}
|
||||
|
||||
void initSpiCs(SPIConfig *spiConfig, brain_pin_e csPin) {
|
||||
|
|
|
@ -57,12 +57,16 @@ void DebugMonitorVector(void);
|
|||
void UsageFaultVector(void);
|
||||
void BusFaultVector(void);
|
||||
void HardFaultVector(void);
|
||||
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,
|
||||
brain_pin_e mosi);
|
||||
void initSpiCs(SPIConfig *spiConfig, brain_pin_e csPin);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* MPU_UTIL_H_ */
|
||||
|
||||
void initSpiModule(SPIDriver *driver, brain_pin_e sck, brain_pin_e miso,
|
||||
brain_pin_e mosi,
|
||||
int sckMode,
|
||||
int mosiMode,
|
||||
int misoMode);
|
||||
void initSpiCs(SPIConfig *spiConfig, brain_pin_e csPin);
|
||||
|
|
|
@ -561,7 +561,10 @@ float[BARO_CORR_SIZE] baroCorrPressureBins;;"kPa", 1, 0, 0.0, 200,
|
|||
float[BARO_CORR_SIZE] baroCorrRpmBins;;"RPM", 1, 0, 0.0, 18000, 2
|
||||
|
||||
baro_corr_table_t baroCorrTable;
|
||||
int[102] unused3;
|
||||
int spi2SckMode;
|
||||
int spi2MosiMode;
|
||||
int spi2MisoMode;
|
||||
int[99] unused3;
|
||||
|
||||
float targetVBatt;;"Volts", 1, 0, 0,30, 1
|
||||
float alternatorOffAboveTps;Turn off alternator output above specified TPS;"%", 1, 0, 0, 200, 2
|
||||
|
|
|
@ -291,5 +291,5 @@ int getRusEfiVersion(void) {
|
|||
return 123; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
||||
return 3211; // this is here to make the compiler happy about the unused array
|
||||
return 20150711;
|
||||
return 20150712;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue