4.14 JNMMGPIOReadBit

This function reads in the specified bit and returns it in the location specified by the pointer to data.

BYTE JNMMGPIOReadBit(int Port,int Bit,int *data);

Name

Description

Port

0 - for port A,

1 - for port B

Bit

DIO line number, 0-15

data

pointer to receive the bit data;

return data is always 0 or 1

Return Value

Error code or 0.

Usage Example

To read single bit.

port = 0; //port A
bit = 6;  //6th bit
JNMMGPIOReadBit(port,bit,&digital_value);

Last updated