long Ret;
char szText[100];
m_StsByte.GetWindowText(szText, sizeof(szText)); //Gets status byte from dialog.
sscanf(szText, "%X", &Stb);
Ret = GpStb(Stb); //Writes Stb information.
Ret = GpSrq(1); //Sends SRQ with EOI.
At first, sets status byte to Stb variable.
And, writes information into own (slave) PD7210C chip by using GpStb
function.
Uses GpSrq
function to request SRQ.
When being polled, the data (1 byte) set by using GpStb
function is sent to master automatically.
However, the master decide whether to accept or refuse the request, therefore, the master does not always accept the request after the slave issues the request.
In samples, checking whether the request
is received is performed repeatedly by using timer.
When the request was received, the timer stops.