Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/Platform/inc/platform.h
2017-12-04 15:18:32 +00:00

126 lines
3.8 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 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 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_ */