git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@427 05563f52-14a8-4384-a975-3d1654cca0fa
114 lines
3.0 KiB
C
114 lines
3.0 KiB
C
// -----------------------------------------------------------------------------
|
|
/// @file CathodeMCP.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
|
|
// -----------------------------------------------------------------------------
|
|
|
|
/**
|
|
* %CathodeMCP implementation
|
|
* \defgroup CathodeMCP Package CathodeMCP
|
|
* \ingroup Platform
|
|
* @{
|
|
*/
|
|
|
|
#ifndef CATHODEMCP_H_
|
|
#define CATHODEMCP_H_
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Include files
|
|
// -----------------------------------------------------------------------------
|
|
|
|
#include "stm32f10x.h"
|
|
|
|
#include "gpio.h"
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Constant and macro definitions
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Type definitions.
|
|
// -----------------------------------------------------------------------------
|
|
|
|
typedef enum
|
|
{
|
|
CathodeMCP_Cathode = 0,
|
|
CathodeMCP_MCP = 1,
|
|
CathodeMCP_NumberOfTypes
|
|
}CathodeMCP_t;
|
|
|
|
struct CathodeMCP
|
|
{
|
|
CathodeMCP_t type;
|
|
char name[20];
|
|
struct Gpio* mcp0;
|
|
struct Gpio* mcp1;
|
|
struct Gpio* mcp2;
|
|
struct Gpio* cat0;
|
|
struct Gpio* cat1;
|
|
struct Gpio* cat2;
|
|
};
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Function declarations
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* CathodeMCP_getInstance
|
|
* Description of function
|
|
*
|
|
* @param void
|
|
*
|
|
* @return struct CathodeMCP*
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern struct CathodeMCP* CathodeMCP_getInstance(void);
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* CathodeMCP_setIO
|
|
* Sets the IO required for the Cathode - MCP switch
|
|
*
|
|
* @param mcp0
|
|
* @param mcp1
|
|
* @param mcp2
|
|
* @param cat0
|
|
* @param cat1
|
|
* @param cat2
|
|
*
|
|
* @return ErrorStatus
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern ErrorStatus CathodeMCP_setIO(struct Gpio* mcp0, struct Gpio* mcp1, struct Gpio* mcp2, struct Gpio* cat0, struct Gpio* cat1, struct Gpio* cat2);
|
|
|
|
|
|
|
|
extern void CathodeMCP_switchToCathode(void);
|
|
|
|
|
|
extern void CathodeMCP_switchToMCP(void);
|
|
|
|
#endif /* CATHODEMCP_H_ */
|
|
|
|
/** @} */
|