請先看『使用說明』
IO Device:F75113 under Linux(32bit & 64bit)
From LEXWiKi
(Difference between revisions)
(8 intermediate revisions not shown.) | |||
Line 2: | Line 2: | ||
== The Sample code source you can download from == | == The Sample code source you can download from == | ||
- | Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F75113/ | + | Source file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F75113/Linux/F75113_linux_src.tar.gz F75113_linux_src.tar.gz] |
- | Binary file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F75113/ | + | Binary file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F75113/Linux/F75113v2.0_linux_bin_x64.tar.gz F75113v2.0_linux_bin_x64.tar.gz] |
- | + | Static function library file: | |
+ | [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F75113/Linux/Fintek_GPIO&WDT&EEPROM&I2C_Linux_V1.14.zip Fintek_GPIO&WDT&EEPROM&I2C_Linux_V1.14.zip] | ||
+ | |||
+ | F75113 SPEC: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F75113/Linux/F75113_V0.17P.rar F75113_V0.17P.rar] | ||
We do the demo test with a test tool which DIx connect to DOx with Relay. | We do the demo test with a test tool which DIx connect to DOx with Relay. | ||
Line 24: | Line 27: | ||
5. WDT is not run because MB not have F75113 and WDT_RST- | 5. WDT is not run because MB not have F75113 and WDT_RST- | ||
- | == How to compile code == | ||
- | |||
- | If the next picture appears | ||
- | |||
- | [[Image:t3.jpg]] | ||
- | |||
- | MB no LPC or the drive placement is wrong | ||
- | |||
- | Drive the location for the next picture | ||
- | |||
- | [[Image:F75113v2.0folder.jpg]] | ||
== F75113 GPIO Picture == | == F75113 GPIO Picture == | ||
Line 43: | Line 35: | ||
=== GPIO Status Register Write === | === GPIO Status Register Write === | ||
- | + | init_fintek_sio(eSIO_TYPE_F81866, 0 ,&sio_data) | |
- | + | ActiveSIO(sio_data.ic_port, sio_data.key); | |
- | + | CHECK_RET(_EnableGPIO(0x06 , eGPIO_Mode_Enable)); | |
- | + | CHECK_RET(_SetGpioOutputEnableIdx( 0x06 , eGPIO_Direction_Out)); | |
- | + | CHECK_RET(_SetGpioDriveEnable( 0x06 , eGPIO_Drive_Mode_OpenDrain)); | |
- | + | CHECK_RET(_SetGpioOutputDataIdx( 0x06 , 1)); | |
- | + | DeactiveSIO(sio_data.ic_port); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
=== GPIO Status Register Read === | === GPIO Status Register Read === | ||
- | + | init_fintek_sio(eSIO_TYPE_F81866, 0 ,&sio_data) | |
- | + | ActiveSIO(sio_data.ic_port, sio_data.key); | |
- | + | CHECK_RET(_EnableGPIO(0x06 , eGPIO_Mode_Enable)); | |
- | + | CHECK_RET(_SetGpioOutputEnableIdx( 0x06 , eGPIO_Direction_In)); | |
- | + | CHECK_RET(_GetGpioInputDataIdx( 0x06 , &data)); | |
- | + | DeactiveSIO(sio_data.ic_port); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
=== GPIO Comparison === | === GPIO Comparison === | ||
- | + | ||
- | + | CHECK_RET(_GetGpioInputDataIdx (0x10,&BDIO_data)); | |
- | if( | + | if((BDIO_data == 1) & (BDIO_startvalue_data == 0) ) |
{ | { | ||
- | + | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton2), TRUE); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
+ | CHECK_RET(_GetGpioInputDataIdx (0x11,&BDI1_data)); | ||
+ | if((BDI1_data == 1) & (BDI1_startvalue_data == 0) ) | ||
+ | { | ||
+ | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton4), TRUE); | ||
+ | } | ||
+ | CHECK_RET(_GetGpioInputDataIdx (0x12,&BDI2_data)); | ||
+ | if((BDI2_data == 1) & (BDI2_startvalue_data == 0) ) | ||
+ | { | ||
+ | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton6), TRUE); | ||
+ | } | ||
+ | CHECK_RET(_GetGpioInputDataIdx (0x13,&BDI3_data)); | ||
+ | if((BDI3_data == 1) & (BDI3_startvalue_data == 0) ) | ||
+ | { | ||
+ | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton8), TRUE); | ||
+ | } | ||
+ | |||
=== F75113 driver delete === | === F75113 driver delete === | ||
- | + | on_window1_destory (GtKObject *object, | |
- | + | gpointer user_data) | |
- | + | { | |
- | + | sFintek_sio_data sio_data; | |
- | + | DeactiveSIO(sio_data.ic_port); | |
- | + | gtk_main_quit(); | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + |
Current revision
Contents |
The Sample code source you can download from
Source file: F75113_linux_src.tar.gz
Binary file: F75113v2.0_linux_bin_x64.tar.gz
Static function library file: Fintek_GPIO&WDT&EEPROM&I2C_Linux_V1.14.zip
F75113 SPEC: F75113_V0.17P.rar
We do the demo test with a test tool which DIx connect to DOx with Relay.
How to use this Demo Application
1. Press the "Start" button to test CIO1 function
2. Press the "Start" button to test CIO2 function
3. Press the "Start" button to test CIO3 function
4. Press the "Start" button to test CIO4 function
5. WDT is not run because MB not have F75113 and WDT_RST-
F75113 GPIO Picture
Introduction
GPIO Status Register Write
init_fintek_sio(eSIO_TYPE_F81866, 0 ,&sio_data) ActiveSIO(sio_data.ic_port, sio_data.key); CHECK_RET(_EnableGPIO(0x06 , eGPIO_Mode_Enable)); CHECK_RET(_SetGpioOutputEnableIdx( 0x06 , eGPIO_Direction_Out)); CHECK_RET(_SetGpioDriveEnable( 0x06 , eGPIO_Drive_Mode_OpenDrain)); CHECK_RET(_SetGpioOutputDataIdx( 0x06 , 1)); DeactiveSIO(sio_data.ic_port);
GPIO Status Register Read
init_fintek_sio(eSIO_TYPE_F81866, 0 ,&sio_data) ActiveSIO(sio_data.ic_port, sio_data.key); CHECK_RET(_EnableGPIO(0x06 , eGPIO_Mode_Enable)); CHECK_RET(_SetGpioOutputEnableIdx( 0x06 , eGPIO_Direction_In)); CHECK_RET(_GetGpioInputDataIdx( 0x06 , &data)); DeactiveSIO(sio_data.ic_port);
GPIO Comparison
CHECK_RET(_GetGpioInputDataIdx (0x10,&BDIO_data)); if((BDIO_data == 1) & (BDIO_startvalue_data == 0) ) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton2), TRUE); } CHECK_RET(_GetGpioInputDataIdx (0x11,&BDI1_data)); if((BDI1_data == 1) & (BDI1_startvalue_data == 0) ) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton4), TRUE); } CHECK_RET(_GetGpioInputDataIdx (0x12,&BDI2_data)); if((BDI2_data == 1) & (BDI2_startvalue_data == 0) ) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton6), TRUE); } CHECK_RET(_GetGpioInputDataIdx (0x13,&BDI3_data)); if((BDI3_data == 1) & (BDI3_startvalue_data == 0) ) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton8), TRUE); }
F75113 driver delete
on_window1_destory (GtKObject *object, gpointer user_data) { sFintek_sio_data sio_data; DeactiveSIO(sio_data.ic_port); gtk_main_quit(); }