-
Enable
- Enable Analog module bean. Events may be generated ("DisableEvent"/"EnableEvent").
ANSIC prototype: byte Enable(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
-
Disable
- Disable Analog module bean. No events will be generated.
ANSIC prototype: byte Disable(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
-
EnableEvent
- Enable the events.
ANSIC prototype: byte EnableEvent(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
-
DisableEvent
- Disable the events.
ANSIC prototype: byte DisableEvent(void)
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
-
SetChannel
- This method selects the channel that specifies one of several possible analog module sources.
ANSIC prototype: byte SetChannel(byte Channel)
- Channel:byte - Channel number.
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_DISABLED - Device is disabled
ERR_BUSY - A conversion is already running
ERR_RANGE - Parameter "Channel" out of range
-
SetGain
- Set the two gains for the two-stage amplifier.
ANSIC prototype: byte SetGain(byte Gain1, byte Gain2)
- Gain1:byte - Gain value from 0 to 15:
0 - Gain=1,
1 - Gain=2,
:
15 - Gain=16.
- Gain2:byte - Gain value from 0 to 15:
0 - Gain=1,
1 - Gain=2,
:
15 - Gain=16.
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_RANGE - Parameter out of range.
-
GetLevel
- This method returns the comparator output level. The comparator comparing 2-stage amplifier output with internal reference.
ANSIC prototype: byte GetLevel(bool *Level)
- Level: Pointer to bool - Actual comparator output level.
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_DISABLED - Device is disabled
-
GetAmpState
- If the output of the 2-stage amplifier is settled, this method returns true. If it is not settled, the method returns false.
ANSIC prototype: byte GetAmpState(bool *State)
- State: Pointer to bool - Actual 2-stage amplifier state.
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_DISABLED - Device is disabled
-
GetCurrentDetectFlag
- If the voltage developed across the sense resistor is equal to or greater than the current sense amplifier comparator trip voltage (typically -9mV), this method returns true. Otherwise returns false.
ANSIC prototype: byte GetCurrentDetectFlag(bool *Flag)
- Flag: Pointer to bool - Current detect flag.
- Return value:byte - Error code, possible codes:
ERR_OK - OK
ERR_SPEED - This device does not work in the active speed mode
ERR_DISABLED - Device is disabled
Note: Some methods can be implemented as macros.