Added PCBA information to project

tested - functional

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@227 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-02 10:08:57 +00:00
parent b7d4985090
commit 802e9c64ca
7 changed files with 343 additions and 3 deletions

View File

@@ -0,0 +1,86 @@
// -----------------------------------------------------------------------------
/// @file PCBA.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) 2015 Micro-Key bv
// -----------------------------------------------------------------------------
/// @defgroup {group_name} {group_description}
/// Description
/// @file PCBA.h
/// @ingroup {group_name}
#ifndef PCBA_H_
#define PCBA_H_
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include "stm32f10x.h"
#include "platform.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Type definitions.
// -----------------------------------------------------------------------------
typedef enum
{
CathodeMCP = 0,
Tesla = 1,
Anode = 2,
ND = 3
}PCBA_t;
struct Pcba
{
PCBA_t pcba;
char name[20];
T_PL_GPIO A0;
T_PL_GPIO A1;
};
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
/** ----------------------------------------------------------------------------
* PCBA_construct
* Initializes the PCBA information of the hardware.
* PCBA information is defined via placed resistors
* This function can only be called once. Within the first call an internal flag
* is set to prevent any further calling. That is because the PCBA information
* cannot change during run-time
*
* @param self The PCBA information
*
* @return ErrorStatus SUCCESS if construction was successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus PCBA_construct(struct Pcba* self);
#endif /* PCBA_H_ */

View File

@@ -60,6 +60,8 @@ typedef struct
GPIO_InitTypeDef GPIO_InitStruct;
} T_PL_GPIO;
// Export of PCBA information
extern struct Pcba* const pcba;
// Export of LEDs
extern struct Led* const ledGreen;