Started working on issue to release tesla gun only when target voltage has been reached git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@430 05563f52-14a8-4384-a975-3d1654cca0fa
140 lines
3.8 KiB
C
140 lines
3.8 KiB
C
// -----------------------------------------------------------------------------
|
|
/// @file TeslaGunSafety.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
|
|
// -----------------------------------------------------------------------------
|
|
|
|
/**
|
|
* %TeslaGunSafety implementation
|
|
* \defgroup TeslaGunSafety Package TeslaGunSafety
|
|
* \ingroup HAL
|
|
* @{
|
|
*/
|
|
|
|
#ifndef INC_TESLAGUNSAFETY_H_
|
|
#define INC_TESLAGUNSAFETY_H_
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Include files
|
|
// -----------------------------------------------------------------------------
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "stm32f10x.h"
|
|
|
|
#include "platform.h"
|
|
#include "gpio.h"
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Constant and macro definitions
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Type definitions.
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Function declarations
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* TeslaGunSafety_construct
|
|
* Constructor for a TeslaGunSafety
|
|
*
|
|
* @param self
|
|
* @param solenoidGpio
|
|
|
|
* @return ErrorStatus
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern ErrorStatus TeslaGunSafety_construct(struct Gpio* gpio);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* TeslaGunSafety_destruct
|
|
* Destructor for a TeslaGunSafety
|
|
*
|
|
* @param self
|
|
|
|
* @return ErrorStatus
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern void TeslaGunSafety_destruct(void);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* TeslaGunSafety_release
|
|
* Opens the TeslaGunSafety
|
|
*
|
|
* @param self
|
|
*
|
|
* @return ErrorStatus
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern ErrorStatus TeslaGunSafety_release(void);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* TeslaGunSafety_isRreleased
|
|
* Opens the TeslaGunSafety
|
|
*
|
|
* @return bool TRUE if released
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern bool TeslaGunSafety_release(void);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* TeslaGunSafety_block
|
|
* Blocks the TeslaGunSafety
|
|
*
|
|
* @param self
|
|
*
|
|
* @return ErrorStatus
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern ErrorStatus TeslaGunSafety_block(void);
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* TeslaGunSafety_getGpio
|
|
* Description of function
|
|
*
|
|
* @return struct Gpio*
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern struct Gpio* TeslaGunSafety_getGpio(void);
|
|
#endif /* INC_TESLASAFETY_H_ */
|
|
|
|
/** @} */
|