Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/Platform/inc/PCBA.h
mmi 71ae4c6832 checked in missing file
git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@240 05563f52-14a8-4384-a975-3d1654cca0fa
2017-10-06 09:04:50 +00:00

101 lines
2.9 KiB
C

// -----------------------------------------------------------------------------
/// @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 creates a singleton. Calling this function for the first time
* constructs the PCBA information. Calling it afterwards returns the already
* constructed data
*
* @return struct Pcba* The PCBA information singelton
*
*
* @todo
* -----------------------------------------------------------------------------
*/
extern struct Pcba* PCBA_getInstance(void);
/** ----------------------------------------------------------------------------
* PCBA_setIO
* Sets the IO used for PCBA detection
*
* @param A0 Input 0
* @param A1 Input 1
*
* @return ErrorStatus SUCCESS if setting was successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus PCBA_setIO(T_PL_GPIO* A0, T_PL_GPIO* A1);
#endif /* PCBA_H_ */