Return to previous page | Return to menu | Go to next page


Bool
System management functions

slGetStatus

Interrupt back (get SMPC status / peripheral data)

Format

Bool slGetStatus()

Parameter

None

Function

After executing this function, the latest SMPC status is automatically acquired in the global variable "Smpc_Status".
Peripheral data is automatically acquired in the global variable "Smpc_Peripheral".
In addition, the number of connected peripherals is automatically acquired in the global variables "Per_Connect1 and Per_Connect2".

Return value

Execution result
      OK ... success
      NG ... failure

Remarks

If the semaphore cannot be acquired (locked by another process), execution will fail.
When the library is started, this function is called only once by "slInitSystem", and the SMPC status at the time of startup is acquired.
After that, “slGetPeripheral” is called to get only peripheral data.
The setting is reflected in the data from the second frame after setting.
Execution fails when the peripheral port I / O settings are invalid.

Reference: HARDWARE MANUAL vol.1 (SMPC)

slGetStatus


Return to previous page | Return to menu | Go to next page