Operational Amplifier Version 1.0
Chapter 5 Amplifier Driver
5 Amplifier Driver
This is OPAMP driver description.
5.1 Peripheral Usage
The MCU pins used as below:
OPAMP_N,used as amplifier negative input;
OPAMP_P,used as amplifier positive input;
OPAMP_O,used as amplifier output;
5.2 Driver Code
5.2.1 General Definition
typedef unsigned char BOOLEAN;
typedef unsigned char INT8U; /* Unsigned 8 bit quantity */
typedef signed char INT8S; /* Signed 8 bit quantity */
typedef unsigned int INT16U; /* Unsigned 16 bit quantity */
typedef signed int INT16S; /* Signed 16 bit quantity */
typedef unsigned long INT32U; /* Unsigned 32 bit quantity */
typedef signed long INT32S; /* Signed 32 bit quantity */
#define BOOL BOOLEAN
#define BYTE INT8U
#define UBYTE INT8U
#define WORD INT16U
#define UWORD INT16U
#define LONG INT32S
#define ULONG INT32U
#define UCHAR INT8U
#define UINT INT16U
#define DWORD INT32U
#define TRUE 1
#define FALSE 0
#define BYTE_LO(w) ((UBYTE)(w))
#define BYTE_HI(w) ((UBYTE)(((UWORD)(w)>>8)&0xFF))
MCU-AN-500080-E-10- Page 11