2014-08-29 07:52:33 -07:00
|
|
|
/*
|
|
|
|
* hardware.h
|
|
|
|
*
|
|
|
|
* @date May 27, 2013
|
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2014
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HARDWARE_H_
|
|
|
|
#define HARDWARE_H_
|
|
|
|
|
|
|
|
#include "main.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2014-09-20 12:03:00 -07:00
|
|
|
SPIDriver * getSpiDevice(spi_device_e spiDevice);
|
2014-08-29 07:52:33 -07:00
|
|
|
void turnOnSpi(spi_device_e device);
|
|
|
|
void lockSpi(spi_device_e device);
|
|
|
|
void unlockSpi(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#define GET_BOARD_TEST_MODE_VALUE() (!palReadPad(getHwPort(boardConfiguration->boardTestModeJumperPin), getHwPin(boardConfiguration->boardTestModeJumperPin)))
|
|
|
|
|
2014-09-08 15:02:52 -07:00
|
|
|
#ifdef __cplusplus
|
|
|
|
#include "engine.h"
|
|
|
|
void initHardware(Logging *logging, Engine *engine);
|
|
|
|
#endif /* __cplusplus */
|
2014-08-29 07:52:33 -07:00
|
|
|
|
|
|
|
#endif /* HARDWARE_H_ */
|