Moxa DA-682A-C7-W7E [62/112] Documentation format

Moxa DA-682A-C7-W7E [62/112] Documentation format
DA-682A Linux Softrware Programming Guide
4-6
Documentation Format
#define mxhtsp_close(fd) close(fd)
Description Closes the hotswap devices.
Parameters fd: the open port
Returns
None
Function Documentation
int mxhtsp_check_partition_usage (const char * partition_name)
Description Gets what percentage of a partition is in use.
Parameters partition_name: the name of the partition being checked. In linux, it should be
/media/diskxpx
Returns None
int mxhtsp_is_button_pressed (int fd, int btn_num)
Description Checks if a button is pressed.
Parameters fd: the open port
btn_num: the button number
Returns 1: pressed
0: not pressed
-1: fail
int mxhtsp_is_disk_busy (int fd, int disk_num)
Description Checks if a disk is busy.
Parameters fd: the open port
disk_num: the disk number
Returns 1: busy
0: idle
-1: fail
int mxhtsp_is_disk_plugged (int fd, int disk_num)
Description Checks if a disk is plugged in.
Parameters fd: the open port
disk_num: the disk number
Returns 1: plugged
0: unplugged
-1: fail
Open the hotswap devices.
Description Checks if a disk is plugged in.
Returns fd if successful
-1: fail
int mxhtsp_set_led (int fd, int led_num, int on)
Description Sets the led to on/off.
Parameters fd: the open port
led_num: the led number
1 on
0 off
Returns 0: success
-1: fail

Содержание

Похожие устройства