started with external DAC implementation git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@224 05563f52-14a8-4384-a975-3d1654cca0fa
94 lines
3.2 KiB
C
94 lines
3.2 KiB
C
// -----------------------------------------------------------------------------
|
|
/// @file MAX5715.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 MAX5715.h
|
|
/// @ingroup {group_name}
|
|
|
|
#ifndef INC_MAX5715_H_
|
|
#define INC_MAX5715_H_
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Include files
|
|
// -----------------------------------------------------------------------------
|
|
|
|
#include "IODevice.h"
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Constant and macro definitions
|
|
// -----------------------------------------------------------------------------
|
|
|
|
#define MAX5715_SEL_DACA (0x0)
|
|
#define MAX5715_SEL_DACB (0x1)
|
|
#define MAX5715_SEL_DACC (0x2)
|
|
#define MAX5715_SEL_DACD (0x4)
|
|
|
|
#define MAX5715_CMD_CODEn (0x00)
|
|
#define MAX5715_CMD_LOADn (0x10)
|
|
#define MAX5715_CMD_CODEn_LOAD_ALL (0x20)
|
|
#define MAX5715_CMD_CODEn_LOADn (0x30)
|
|
#define MAX5715_CMD_POWER_NORMAL (0x40)
|
|
#define MAX5715_CMD_POWER_PD1K (0x41)
|
|
#define MAX5715_CMD_POWER_PD100K (0x42)
|
|
#define MAX5715_CMD_POWER_HIGHZ (0x43)
|
|
#define MAX5715_CMD_SW_CLEAR (0x50)
|
|
#define MAX5715_CMD_SW_RESET (0x51)
|
|
#define MAX5715_CMD_CONFIG_LATCH_ON (0x60)
|
|
#define MAX5715_CMD_CONFIG_LATCH_OFF (0x61)
|
|
#define MAX5715_CMD_REF_DAC_EXT (0x70)
|
|
#define MAX5715_CMD_REF_DAC_2V5 (0x71)
|
|
#define MAX5715_CMD_REF_DAC_2V0 (0x72)
|
|
#define MAX5715_CMD_REF_DAC_4V0 (0x73)
|
|
#define MAX5715_CMD_REF_ON_EXT (0x74)
|
|
#define MAX5715_CMD_REF_ON_2V5 (0x75)
|
|
#define MAX5715_CMD_REF_ON_2V0 (0x76)
|
|
#define MAX5715_CMD_REF_ON_4V0 (0x77)
|
|
#define MAX5715_CMD_CODE_ALL (0x80)
|
|
#define MAX5715_CMD_LOAD_ALL (0x81)
|
|
#define MAX5715_CMD_CODE_ALL_LOAD_ALL (0x82)
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Type definitions.
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Function declarations
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
/** ----------------------------------------------------------------------------
|
|
* MAX5715_construct
|
|
* Description of function
|
|
*
|
|
* @param self
|
|
*
|
|
* @return ErrorStatus
|
|
*
|
|
* @todo
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
extern ErrorStatus MAX5715_construct(const struct IODevice* self, para2_name);
|
|
|
|
#endif /* INC_MAX5715_H_ */
|