Added all required GPIOs
git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@242 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -48,7 +48,7 @@ typedef enum
|
||||
{
|
||||
INPUT = 0,
|
||||
OUTPUT = !INPUT
|
||||
}GpioDirection;
|
||||
} GpioDirection;
|
||||
|
||||
struct Gpio
|
||||
{
|
||||
@@ -56,6 +56,7 @@ struct Gpio
|
||||
T_PL_GPIO gpio;
|
||||
GpioDirection direction;
|
||||
bool status;
|
||||
bool initialized;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -64,10 +64,6 @@ extern struct Logger* mainLog;
|
||||
|
||||
// Export of PCBA information
|
||||
extern struct Pcba* pcba;
|
||||
|
||||
// Export of LEDs
|
||||
extern struct Gpio* const ledGreen;
|
||||
extern struct Gpio* const ledOrange;
|
||||
// Export of ADCs
|
||||
extern struct Adc* const adc1;
|
||||
// Export of the rtc
|
||||
@@ -81,9 +77,22 @@ extern struct Spi* const spi3;
|
||||
extern struct SpiDevice* const spiDAC;
|
||||
extern struct SpiDevice* const spiDisplay;
|
||||
extern struct SpiDevice* const spiEEPROM;
|
||||
|
||||
// Export of Keypad
|
||||
extern struct Keypad* const keypad;
|
||||
|
||||
// Export of GPIOs
|
||||
extern struct Gpio* const ledGreen;
|
||||
extern struct Gpio* const ledOrange;
|
||||
extern struct Gpio* const power6v5Enable;
|
||||
extern struct Gpio* const interlock1;
|
||||
extern struct Gpio* const interlock2;
|
||||
extern struct Gpio* const solenoid;
|
||||
extern struct Gpio* const mcp0Relay;
|
||||
extern struct Gpio* const mcp1Relay;
|
||||
extern struct Gpio* const mcp2Relay;
|
||||
extern struct Gpio* const cat0Relay;
|
||||
extern struct Gpio* const cat1Relay;
|
||||
extern struct Gpio* const cat2Relay;
|
||||
extern struct Gpio* const teslaLock;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "IODevice.h"
|
||||
#include "spi.h"
|
||||
|
||||
@@ -50,6 +52,7 @@ struct SpiDevice
|
||||
struct Spi* spi;
|
||||
struct SpiParameters parameters;
|
||||
T_PL_GPIO SPI_CE;
|
||||
bool initialized;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
// Include files
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "semphr.h"
|
||||
|
||||
@@ -85,6 +87,7 @@ struct Uart
|
||||
SemaphoreHandle_t txSemaphore; //! Semaphore for transmit handler
|
||||
xQueueHandle txQueue; //! USART Transfer queue identifier
|
||||
xQueueHandle rxQueue; //! USART Receive queue identifier
|
||||
bool initialized;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user