Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/Platform/inc/platform.h
mmi 5e6e8a8ff5 Stability Fix
Clearing flags instead of ITStatus seems to improve stability in EXTI interrupts

Added ASSERT functionality for STM std periphery library

Also busy updating the HW validation menu


git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@411 05563f52-14a8-4384-a975-3d1654cca0fa
2017-12-22 14:09:08 +00:00

141 lines
4.3 KiB
C

// -----------------------------------------------------------------------------
/// @file platform.h
/// @brief File description
// -----------------------------------------------------------------------------
// Micro-Key bv
// Industrieweg 28, 9804 TG Noordhorn
// Postbus 92, 9800 AB Zuidhorn
// The Netherlands
// Tel: +31 594 503020
// Fax: +31 594 505825
// Email: support@microkey.nl
// Web: www.microkey.nl
// -----------------------------------------------------------------------------
/// $Revision$
/// $Author$
/// $Date$
// (c) 2017 Micro-Key bv
// -----------------------------------------------------------------------------
/// @defgroup {HAL} {group_description}
/// This file defines the properties for the Olimex STM32 H107 dev-kit
/// platform.
///
/// @file olx_stm32_h107.h
/// @ingroup {HAL}
#ifndef PLATFORM_INC_PLATFORM_H_
#define PLATFORM_INC_PLATFORM_H_
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include <stdio.h>
#include "FreeRTOSConfig.h"
#include "stm32f10x.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_spi.h"
#include "stm32f10x_usart.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
#define CACHED_STORAGE_PAGESIZE ((uint16_t)0x200)
// -----------------------------------------------------------------------------
// Type definitions.
// -----------------------------------------------------------------------------
typedef struct
{
GPIO_TypeDef* GPIO_Typedef;
GPIO_InitTypeDef GPIO_InitStruct;
} T_PL_GPIO;
extern struct Buzzer* mainBuzzer;
extern struct Logger* mainLog;
// Export of ADCs
extern struct Adc* const adc1;
// Export of the rtc
extern struct Rtc* const rtc;
// Export of UARTs
extern struct Uart* const uart1;
extern struct Uart* const uart3;
// Export of SPIs
extern struct Spi* const spi1;
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;
extern struct Storm700* const storm700;
// internal FLASH
extern struct InternalFlash* const iFlash;
// Export of GPIOs
extern struct Gpio* const ledBicolourGreen;
extern struct Gpio* const ledBicolourRed;
extern struct Gpio* const solenoid;
extern struct Gpio* const buzzer;
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 teslaRelay;
extern struct Gpio* const hv0Present;
extern struct Gpio* const hv1Present;
extern struct Gpio* const hv2Present;
extern struct Interlock* const interlock;
extern struct NHD0420* const nhd0420;
extern struct MAX5715* const max5715;
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
/** ----------------------------------------------------------------------------
* initPlatform
* Initialises the platform-specific properties like GPIO, peripheral systems
* and the like
*
* @return ErrorStatus SUCCESS if init was successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus initPlatform(void);
/** ----------------------------------------------------------------------------
* destructPlatform
* Function de de-initialise (destruct) the platform-specific properties and
* safely remove all settings that have been set-up with the initPlatform
* function
*
* @return ErrorStatus SUCCESS if init was successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus destructPlatform(void);
#endif /* PLATFORM_INC_PLATFORM_H_ */