Improvements:

- HAL re-organized
- FreeRTOS running stable
- UART finished
- SPI1 & SPI3 finished and functional
- Display driver added (functional)


git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@172 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-09-20 06:51:53 +00:00
parent f5dd9e0f09
commit c9562e8bfd
313 changed files with 8279 additions and 50216 deletions

View File

@@ -0,0 +1,106 @@
// -----------------------------------------------------------------------------
/// @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 "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
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Type definitions.
// -----------------------------------------------------------------------------
typedef struct
{
GPIO_TypeDef* GPIO_Typedef;
GPIO_InitTypeDef GPIO_InitStruct;
} T_PL_GPIO;
// Export of LEDs
extern struct Led* const ledGreen;
extern struct Led* const ledOrange;
// Export of UARTs
extern struct Uart* const uart1;
// 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;
// -----------------------------------------------------------------------------
// 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_ */