請先看『使用說明』
IO Device:F81966 LPC DIO under Linux console
From LEXWiKi
(Difference between revisions)
(→Digital Input/Ooutput test) |
|||
(23 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
[[Category:AllowPages]] | [[Category:AllowPages]] | ||
== The Sample code source you can download from == | == The Sample code source you can download from == | ||
+ | <!-- | ||
+ | <Google Drive> | ||
Source file: | Source file: | ||
- | [ | + | [https://drive.google.com/file/d/1f7XxtDyAPiZIoMAg6w_CfBeCpruAckvE/view?usp=sharing F81966_DIO_v1.1L_Src] |
Binary file: | Binary file: | ||
- | [ | + | [https://drive.google.com/file/d/1DxCovn0yHvrt6kSfOJNwwG9bAl2F0sAp/view?usp=sharing F81966_DIO_v1.1L_Bin_x86] |
- | [ | + | [https://drive.google.com/file/d/1MKdBXIAN3zo4u4vFwDFEu3nxReMsZA2U/view?usp=drive_link F81966_DIO_v1.1L_Bin_x64] |
F81966 Libary : | F81966 Libary : | ||
- | [ | + | [https://drive.google.com/file/d/1YNIuL2erP1zZbBHSq8a-yj4PtVyBeQgS/view?usp=sharing F81966_LIB_v1.1L_x86] |
- | [ | + | [https://drive.google.com/file/d/1Pg53LOhnpjrsgptcKI10wfQOhsUxYE5J/view?usp=drive_link F81966_LIB_v1.1L_x64] |
+ | --> | ||
- | + | <FTP> | |
- | + | ||
- | # | + | Source file: |
- | # | + | [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/F81966_LPC_Utility_L_src.zip F81966_LPC_Utility_L_src] |
- | # | + | |
- | #Enable | + | Binary file: |
+ | [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/F81966_LPC_Utility_L.zip F81966_LPC_Utility] | ||
+ | |||
+ | F81966 Libary : | ||
+ | [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/F81966_LPC_DIO/Linux_console/libF81966_bin_x86_64.zip libF81966_bin_x86_64] | ||
+ | |||
+ | == MB Support List== | ||
+ | <!--box uid=f777871962f1c0432784d4e0e73802b8.1125.E5be5052285e42--> | ||
+ | <!-- | ||
+ | ****************************************************************************************** | ||
+ | * | ||
+ | * ** PLEASE DON'T EDIT THIS TABLE DIRECTLY. Use the edit table link under the table. ** | ||
+ | * | ||
+ | ****************************************************************************************** --> | ||
+ | {|class = 'sortable' border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; border: 1px #aaa solid; border-collapse: collapse;" id='506' | ||
+ | |- bgcolor = #ccccff | ||
+ | !Elkhart Lake!!Raptor Lake | ||
+ | |- | ||
+ | | | ||
+ | 2I640CW | ||
+ | | | ||
+ | 3I130TW | ||
+ | |-class='sortbottom' | ||
+ | |||
+ | |} | ||
+ | [{{SERVER}}/lexwiki/index.php?title=Special:TableEdit&id=f777871962f1c0432784d4e0e73802b8.1125.E5be5052285e42&page=1125&pagename={{FULLPAGENAMEE}} edit table] | ||
+ | <!--box uid=f777871962f1c0432784d4e0e73802b8.1125.E5be5052285e42--> | ||
+ | |||
+ | == Introduction F81966 CIO== | ||
+ | [[Image:F81966_Linux_help.jpg]]<br> | ||
+ | |||
+ | #Use GET_CIO_INPUT to get the digital input data | ||
+ | #Use SET_CIO_OUTPUT_DATA to set digital output data | ||
+ | #Single bit setting can use SetCIOXBit0, SetCIOXBit1 | ||
+ | #Read a single bit using GetCIOXBit | ||
+ | # Enable WDT and continuously reset WDT to ensure that the restart signal will not be triggered when the system is normal | ||
- | == | + | == libF81966.so Function == |
<pre> | <pre> | ||
- | + | bool F81966_OPEN(); | |
- | + | void F81966_Init(); | |
- | + | ||
- | + | BYTE GET_CIO_INPUT(int CIO_Number); | |
- | + | BYTE GET_CIO_OUTPUT_DATA(int CIO_Number); | |
- | + | BYTE SET_CIO_OUTPUT_DATA(int CIO_Number, BYTE byteValue); | |
- | + | ||
- | + | BYTE GetCIOXBit(int CIO_Number, BYTE bitPosition); | |
- | + | BYTE SetCIOXBit0(int CIO_Number,BYTE byteValue, BYTE bitPosition); | |
- | + | BYTE SetCIOXBit1(int CIO_Number,BYTE byteValue, BYTE bitPosition); | |
- | + | ||
- | + | void F81966_LPC_Set_WDT_Enable(BYTE byteValue); | |
+ | void F81966_LPC_Set_WDT_Disable(); | ||
+ | |||
</pre> | </pre> | ||
- | === | + | === test_F81966 CIO Input/Ooutput === |
- | + | ||
- | + | ||
'''sample code''' | '''sample code''' | ||
<pre> | <pre> | ||
- | Set CIO1 | + | Set CIO1 Digital Output all bit low |
- | + | test_F81966 write 0xf; | |
- | Set CIO1 CIO2 Digital Output all low | ||
- | F81966_LPC_Digital_Write_LOW(0); | ||
- | Set | + | Set CIO2 Digital Output all bit low |
- | + | test_F81966 write 2 0x0; | |
- | Set | + | Set CIO3 Digital Output all bit high |
- | + | test_F81966 write 3 0xf; | |
+ | |||
+ | Get CIO4 Digital Input | ||
+ | test_F81966 read 4; | ||
</pre> | </pre> | ||
<pre> | <pre> | ||
- | + | read bit position | |
- | + | test_F81966 getbit 1 1 | |
+ | |||
+ | write bit position | ||
+ | test_F81966 setbit 1 0 1 | ||
</pre> | </pre> | ||
=== Watch Dog test=== | === Watch Dog test=== | ||
'''sample code'''<br> | '''sample code'''<br> | ||
+ | test_F81966 getbit 1 1 | ||
<pre> | <pre> | ||
Set WDT 10 sec | Set WDT 10 sec | ||
- | + | test_F81966 wdt enable 10; | |
</pre> | </pre> | ||
<pre> | <pre> | ||
Disable WDT | Disable WDT | ||
- | + | test_F81966 wdt disable; | |
</pre> | </pre> |
Current revision
Contents |
The Sample code source you can download from
<FTP>
Source file: F81966_LPC_Utility_L_src
Binary file: F81966_LPC_Utility
F81966 Libary : libF81966_bin_x86_64
MB Support List
Elkhart Lake | Raptor Lake |
---|---|
2I640CW |
3I130TW |
Introduction F81966 CIO
- Use GET_CIO_INPUT to get the digital input data
- Use SET_CIO_OUTPUT_DATA to set digital output data
- Single bit setting can use SetCIOXBit0, SetCIOXBit1
- Read a single bit using GetCIOXBit
- Enable WDT and continuously reset WDT to ensure that the restart signal will not be triggered when the system is normal
libF81966.so Function
bool F81966_OPEN(); void F81966_Init(); BYTE GET_CIO_INPUT(int CIO_Number); BYTE GET_CIO_OUTPUT_DATA(int CIO_Number); BYTE SET_CIO_OUTPUT_DATA(int CIO_Number, BYTE byteValue); BYTE GetCIOXBit(int CIO_Number, BYTE bitPosition); BYTE SetCIOXBit0(int CIO_Number,BYTE byteValue, BYTE bitPosition); BYTE SetCIOXBit1(int CIO_Number,BYTE byteValue, BYTE bitPosition); void F81966_LPC_Set_WDT_Enable(BYTE byteValue); void F81966_LPC_Set_WDT_Disable();
test_F81966 CIO Input/Ooutput
sample code
Set CIO1 Digital Output all bit low test_F81966 write 0xf; Set CIO2 Digital Output all bit low test_F81966 write 2 0x0; Set CIO3 Digital Output all bit high test_F81966 write 3 0xf; Get CIO4 Digital Input test_F81966 read 4;
read bit position test_F81966 getbit 1 1 write bit position test_F81966 setbit 1 0 1
Watch Dog test
sample code
test_F81966 getbit 1 1
Set WDT 10 sec test_F81966 wdt enable 10;
Disable WDT test_F81966 wdt disable;