4.10 CLASSB_IO_InputSamplingEnable
Function
void CLASSB_IO_InputSamplingEnable(CLASSB_PORT_INDEX port, CLASSB_PORT_PIN pin);
Summary
Enable input sampling for an IO pin.
Description
Before testing an output pin with CLASSB_RST_IOTest() API, call this function to enable input sampling, so that the 'IN' register will have the data from the port pin. In this CLass B library, this function is simply a delay to assure that 2 bus cycles occur between setting the port latch and reading the input buffer.
Precondition
None.
Parameters
port - Index of the IO PORT. Defined by enum CLASSB_PORT_INDEX.
pin - Index of the pin on the given PORT. Defined by enum CLASSB_PORT_PIN.
state - Expected logic state of the IO pin. It can be PORT_PIN_LOW or PORT_PIN_HIGH.
Returns
CLASSB_TEST_STATUS - Status of the test.
Example
CLASSB_TEST_STATUS classb_test_status = CLASSB_TEST_NOT_EXECUTED;
// Perform test of an IO pin at run-time
classb_test_status = CLASSB_RST_IOTest(PORTB, PIN31, PORT_PIN_HIGH);
Remarks
This self-test can be used only during run-time.