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; | |
typedef signed | char | INT8S; |
typedef unsigned int | INT16U; | |
typedef signed | int | INT16S; |
typedef unsigned long INT32U; | ||
typedef signed | long | INT32S; |
/* Unsigned | 8 bit quantity */ |
/* Signed | 8 bit quantity */ |
/* Unsigned 16 bit quantity */ | |
/* Signed | 16 bit quantity */ |
/* Unsigned 32 bit quantity */ | |
/* 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)) |