From 8d086d6de82a64ce5399a3014081490b57de2fcd Mon Sep 17 00:00:00 2001 From: jede Date: Sun, 28 Jan 2024 22:08:15 +0100 Subject: [PATCH] fix --- docs/api/2024.2/assembly/index.html | 810 +--- docs/api/2024.2/c/index.html | 6735 +------------------------- docs/api/2024.2/ch376.inc/index.html | 2 +- docs/api/assembly/index.html | 618 ++- docs/api/c/index.html | 293 +- docs/api/search/search_index.json | 2 +- docs/api/sitemap.xml.gz | Bin 127 -> 127 bytes docs/builddocs.sh | 8 +- docs/code/2024.2/assembly.md | 816 +--- docs/code/2024.2/c.md | 3212 +----------- docs/code/assembly.md | 640 +++ docs/code/c.md | 230 + 12 files changed, 2021 insertions(+), 11345 deletions(-) diff --git a/docs/api/2024.2/assembly/index.html b/docs/api/2024.2/assembly/index.html index abf5093..ff6b2ca 100644 --- a/docs/api/2024.2/assembly/index.html +++ b/docs/api/2024.2/assembly/index.html @@ -398,13 +398,6 @@ ch376_check_exist - - -
  • - - ch376_check_exist - -
  • @@ -412,13 +405,6 @@ ch376_dir_create -
  • - -
  • - - ch376_dir_create - -
  • @@ -426,13 +412,6 @@ ch376_disk_capacity -
  • - -
  • - - ch376_disk_capacity - -
  • @@ -440,13 +419,6 @@ ch376_disk_mount -
  • - -
  • - - ch376_disk_mount - -
  • @@ -454,13 +426,6 @@ ch376_disk_query -
  • - -
  • - - ch376_disk_query - -
  • @@ -468,13 +433,6 @@ ch376_file_close -
  • - -
  • - - ch376_file_close - -
  • @@ -482,13 +440,6 @@ ch376_file_create -
  • - -
  • - - ch376_file_create - -
  • @@ -496,13 +447,6 @@ ch376_file_erase -
  • - -
  • - - ch376_file_erase - -
  • @@ -510,13 +454,6 @@ ch376_file_open -
  • - -
  • - - ch376_file_open - -
  • @@ -524,13 +461,6 @@ ch376_get_descr -
  • - -
  • - - ch376_get_descr - -
  • @@ -538,13 +468,6 @@ ch376_get_file_size -
  • - -
  • - - ch376_get_file_size - -
  • @@ -552,13 +475,6 @@ ch376_ic_get_ver -
  • - -
  • - - ch376_ic_get_ver - -
  • @@ -566,13 +482,6 @@ ch376_issue_token_x -
  • - -
  • - - ch376_issue_token_x - -
  • @@ -580,13 +489,6 @@ ch376_lib_version -
  • - -
  • - - ch376_lib_version - -
  • @@ -594,13 +496,6 @@ ch376_reset_all -
  • - -
  • - - ch376_reset_all - -
  • @@ -608,13 +503,6 @@ ch376_seek_file -
  • - -
  • - - ch376_seek_file - -
  • @@ -622,13 +510,6 @@ ch376_set_address -
  • - -
  • - - ch376_set_address - -
  • @@ -636,13 +517,6 @@ ch376_set_config -
  • - -
  • - - ch376_set_config - -
  • @@ -650,13 +524,6 @@ ch376_set_file_name -
  • - -
  • - - ch376_set_file_name - -
  • @@ -664,13 +531,6 @@ ch376_set_usb_addr -
  • - -
  • - - ch376_set_usb_addr - -
  • @@ -678,13 +538,6 @@ ch376_set_usb_mode -
  • - -
  • - - ch376_set_usb_mode - -
  • @@ -692,13 +545,6 @@ ch376_set_usb_speed -
  • - -
  • - - ch376_set_usb_speed - -
  • @@ -706,13 +552,6 @@ ch376_wait_response -
  • - -
  • - - ch376_wait_response - -
  • @@ -720,13 +559,6 @@ ch376_wr_usb_data -
  • - -
  • - - ch376_wr_usb_data - -
  • @@ -824,13 +656,6 @@ ch376_check_exist - - -
  • - - ch376_check_exist - -
  • @@ -838,13 +663,6 @@ ch376_dir_create -
  • - -
  • - - ch376_dir_create - -
  • @@ -852,13 +670,6 @@ ch376_disk_capacity -
  • - -
  • - - ch376_disk_capacity - -
  • @@ -866,13 +677,6 @@ ch376_disk_mount -
  • - -
  • - - ch376_disk_mount - -
  • @@ -880,13 +684,6 @@ ch376_disk_query -
  • - -
  • - - ch376_disk_query - -
  • @@ -894,13 +691,6 @@ ch376_file_close -
  • - -
  • - - ch376_file_close - -
  • @@ -908,13 +698,6 @@ ch376_file_create -
  • - -
  • - - ch376_file_create - -
  • @@ -922,13 +705,6 @@ ch376_file_erase -
  • - -
  • - - ch376_file_erase - -
  • @@ -936,13 +712,6 @@ ch376_file_open -
  • - -
  • - - ch376_file_open - -
  • @@ -950,13 +719,6 @@ ch376_get_descr -
  • - -
  • - - ch376_get_descr - -
  • @@ -964,13 +726,6 @@ ch376_get_file_size -
  • - -
  • - - ch376_get_file_size - -
  • @@ -978,13 +733,6 @@ ch376_ic_get_ver -
  • - -
  • - - ch376_ic_get_ver - -
  • @@ -992,13 +740,6 @@ ch376_issue_token_x -
  • - -
  • - - ch376_issue_token_x - -
  • @@ -1006,13 +747,6 @@ ch376_lib_version -
  • - -
  • - - ch376_lib_version - -
  • @@ -1023,120 +757,57 @@
  • - - ch376_reset_all + + ch376_seek_file
  • - - ch376_seek_file + + ch376_set_address
  • - - ch376_seek_file + + ch376_set_config
  • - - ch376_set_address + + ch376_set_file_name
  • - - ch376_set_address + + ch376_set_usb_addr
  • - - ch376_set_config + + ch376_set_usb_mode
  • - - ch376_set_config + + ch376_set_usb_speed
  • - - ch376_set_file_name - - -
  • - -
  • - - ch376_set_file_name - - -
  • - -
  • - - ch376_set_usb_addr - - -
  • - -
  • - - ch376_set_usb_addr - - -
  • - -
  • - - ch376_set_usb_mode - - -
  • - -
  • - - ch376_set_usb_mode - - -
  • - -
  • - - ch376_set_usb_speed - - -
  • - -
  • - - ch376_set_usb_speed - - -
  • - -
  • - - ch376_wait_response - - -
  • - -
  • - - ch376_wait_response + + ch376_wait_response
  • @@ -1146,13 +817,6 @@ ch376_wr_usb_data - - -
  • - - ch376_wr_usb_data - -
  • @@ -1190,25 +854,6 @@

    ch376_check_exist

    @exists: ... -

    ch376_check_exist

    -

    Description

    -

    If ch376 is present, it will return $AA

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_check_exist
    - cmp #$AA
    - beq @exists
    - rts ; Does not exist
    -@exists:
    -...
    -

    ch376_dir_create

    Description

    create a folder

    @@ -1226,35 +871,12 @@

    ch376_dir_create

     jsr ch376_dir_create
      ; check accumulator here ch376_wait_response had been launched by ch376_dir_create
     
    -

    ch376_dir_create

    -

    Description

    -

    create a folder

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_dir_create
    - ; check accumulator here ch376_wait_response had been launched by ch376_dir_create
    -

    ch376_disk_capacity

    Description

    check disk capacity

    Impossible to use

    -

    ch376_disk_capacity

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -

    ch376_disk_mount

    Description

    perform a disk mount

    @@ -1272,31 +894,10 @@

    ch376_disk_mount

     jsr ch376_disk_mount
      ; check accumulator here ch376_wait_response had been launched by ch376_disk_mount
     
    -

    ch376_disk_mount

    -

    Description

    -

    perform a disk mount

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_disk_mount
    - ; check accumulator here ch376_wait_response had been launched by ch376_disk_mount
    -

    ch376_disk_query

    Impossible to use

    -

    ch376_disk_query

    -
    -

    Impossible to use

    -

    ch376_file_close

    Description

    Close file

    @@ -1314,23 +915,6 @@

    ch376_file_close

     jsr ch376_file_close
      ; check accumulator here ch376_wait_response had been launched by ch376_file_close
     
    -

    ch376_file_close

    -

    Description

    -

    Close file

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_file_close
    - ; check accumulator here ch376_wait_response had been launched by ch376_file_close
    -

    ch376_file_create

    Description

    create file

    @@ -1348,23 +932,6 @@

    ch376_file_create

     jsr ch376_file_create
      ; check accumulator here ch376_wait_response had been launched by ch376_file_create
     
    -

    ch376_file_create

    -

    Description

    -

    create file

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_file_create
    - ; check accumulator here ch376_wait_response had been launched by ch376_file_create
    -

    ch376_file_erase

    Description

    Erase file

    @@ -1384,25 +951,6 @@

    ch376_file_erase

    ; Ch376_wait_response had been launched ; By ch376_file_erase -

    ch376_file_erase

    -

    Description

    -

    Erase file

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_file_erase
    - ; Check accumulator here :
    - ; Ch376_wait_response had been launched
    - ; By ch376_file_erase
    -

    ch376_file_open

    Description

    open file

    @@ -1421,24 +969,6 @@

    ch376_file_open

    ; check accumulator here ch376_wait_response had been launched by ch376_file_open rts -

    ch376_file_open

    -

    Description

    -

    open file

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_file_erase
    - ; check accumulator here ch376_wait_response had been launched by ch376_file_open
    - rts
    -

    ch376_get_descr

    Description

    Get usb descr device

    @@ -1456,35 +986,12 @@

    ch376_get_descr

    ; check accumulator here ch376_wait_response had been launched by ch376_get_descr rts -

    ch376_get_descr

    -

    Description

    -

    Get usb descr device

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_get_descr
    - ; check accumulator here ch376_wait_response had been launched by ch376_get_descr
    - rts
    -

    ch376_get_file_size

    Description

    Get file size

    Impossible to use

    -

    ch376_get_file_size

    -

    Description

    -

    Get file size

    -
    -

    Impossible to use

    -

    ch376_ic_get_ver

    Description

    Get ch376 firmware version

    @@ -1500,21 +1007,6 @@

    ch376_ic_get_ver

     jsr ch376_ic_get_ver
      ; check accumulator for Version (integer value)
     
    -

    ch376_ic_get_ver

    -

    Description

    -

    Get ch376 firmware version

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_ic_get_ver
    - ; check accumulator for Version (integer value)
    -

    ch376_issue_token_x

    Description

    Send Token for control transfert

    @@ -1537,28 +1029,6 @@

    ch376_issue_token_x

    jsr ch376_issue_token_x ; check accumulator for ch376 status -

    ch376_issue_token_x

    -

    Description

    -

    Send Token for control transfert

    -

    Input

    - -

    Modify

    - -

    Returns

    - -

    Example

    -
     lda #$80
    - jsr ch376_issue_token_x
    - ; check accumulator for ch376 status
    -

    ch376_lib_version

    Description

    Get lib version

    @@ -1581,28 +1051,6 @@

    ch376_lib_version

    ... rts -

    ch376_lib_version

    -

    Description

    -

    Get lib version

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_lib_version
    - cmp #CH376_LIB_VERSION_2024_2
    - beq @right_version
    - ; Wrong version
    -...
    - rts
    -@right_version:
    -...
    - rts
    -

    ch376_reset_all

    Description

    reset CH376

    @@ -1616,19 +1064,6 @@

    ch376_reset_all

     jsr ch376_reset_all
      rts
     
    -

    ch376_reset_all

    -

    Description

    -

    reset CH376

    -

    Modify

    - -

    Example

    -
     jsr ch376_reset_all
    - rts
    -

    ch376_seek_file

    Description

    Seek file. Performs a wait_response

    @@ -1660,37 +1095,6 @@

    ch376_seek_file

    Not tested

    -

    ch376_seek_file

    -

    Description

    -

    Seek file. Performs a wait_response

    -

    Input

    - -

    Modify

    - -

    Returns

    - -

    Example

    -
     lda #$04
    - sta RES
    - lda #$01
    - ldy #$02
    - ldx #$03
    - jsr ch376_seek_file
    - ; check accumulator here ch376_wait_response had been launched by ch376_seek_file
    -
    -
    -

    Not tested

    -

    ch376_set_address

    Description

    set usb address

    @@ -1702,17 +1106,6 @@

    ch376_set_address

     lda #$02
      jsr ch376_set_address
     
    -

    ch376_set_address

    -

    Description

    -

    set usb address

    -

    Modify

    - -

    Example

    -
     lda #$02
    - jsr ch376_set_address
    -

    endproc proc ch376_set_bytes_read ;;@brief Set bytes to read. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip @@ -1744,50 +1137,6 @@

    ch376_set_address

    endif jmp _ch376_wait_response endproc -proc ch376_set_bytes_write - ;;@brief Set bytes to write. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip - ;;@inputA Low value - ;;@inputY High value - ;;@modifyX - ;;@modifyA - ;;@ca65 - ;;@` lda #$02 - ;;@` ldy #$10 - ;;@` jsr ch376_set_bytes_write - ;;@ - jmp ch376_set_bytes_read::write_entry_point -endproc -endproc -proc ch376_set_bytes_read - ;;@brief Set bytes to read. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip - ;;@inputA Low value - ;;@inputY High value - ;;@modifyX - ;;@modifyA - ;;@ca65 - ;;@` lda #$02 - ;;@` ldy #$10 - ;;@` jsr ch376_set_bytes_read - ;;@ - ldx #CH376_BYTE_READ - .byt $2C ; jump 2 bytes with the hack bit $xxxx -rite_entry_point: - ldx #CH376_BYTE_WRITE - stx CH376_COMMAND - sta CH376_DATA - sty CH376_DATA -IFPC02 -pc02 - stz CH376_DATA - stz CH376_DATA -p02 -else - lda #$00 - sta CH376_DATA - sta CH376_DATA -endif - jmp _ch376_wait_response -endproc proc ch376_set_bytes_write ;;@brief Set bytes to write. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip ;;@inputA Low value @@ -1816,21 +1165,6 @@

    ch376_set_config

     lda #$02
      jsr ch376_set_config
     
    -

    ch376_set_config

    -

    Description

    -

    set config for usb device

    -

    Input

    - -

    Modify

    - -

    Example

    -
     lda #$02
    - jsr ch376_set_config
    -

    ch376_set_file_name

    Description

    set file_name

    @@ -1852,27 +1186,6 @@

    ch376_set_file_name

    myfile: .byte "hello.txt" -

    ch376_set_file_name

    -

    Description

    -

    set file_name

    -

    Input

    - -

    Modify

    - -

    Example

    -
     lda #<myfile
    - ldy #>myfile
    - jsr ch376_set_file_name
    - rts
    -myfile:
    - .byte "hello.txt"
    -

    ch376_set_usb_addr

    Description

    set usb_address

    @@ -1890,23 +1203,6 @@

    ch376_set_usb_addr

    jsr ch376_set_usb_addr rts -

    ch376_set_usb_addr

    -

    Description

    -

    set usb_address

    -

    Input

    - -

    Modify

    - -

    Example

    -
    ; Set usb addr
    - lda #$02
    - jsr ch376_set_usb_addr
    - rts
    -

    ch376_set_usb_mode

    Description

    Set usb mode

    @@ -1923,22 +1219,6 @@

    ch376_set_usb_mode

    jsr ch376_set_usb_mode rts -

    ch376_set_usb_mode

    -

    Description

    -

    Set usb mode

    -

    Input

    - -

    Modify

    - -

    Example

    -
     lda #CH376_USB_MODE_HOST_RESET
    - jsr ch376_set_usb_mode
    - rts
    -

    ch376_set_usb_speed

    Description

    Set usb mode

    @@ -1955,22 +1235,6 @@

    ch376_set_usb_speed

    jsr ch376_set_usb_speed rts -

    ch376_set_usb_speed

    -

    Description

    -

    Set usb mode

    -

    Input

    - -

    Modify

    - -

    Example

    -
     lda #$02
    - jsr ch376_set_usb_speed
    - rts
    -

    ch376_wait_response

    Description

    Perform wait_response. It's not needed to call because some commands already perform ch376_wait_response

    @@ -1988,23 +1252,6 @@

    ch376_wait_response

     jsr ch376_wait_response
      rts
     
    -

    ch376_wait_response

    -

    Description

    -

    Perform wait_response. It's not needed to call because some commands already perform ch376_wait_response

    -

    Modify

    - -

    Returns

    - -

    Example

    -
     jsr ch376_wait_response
    - rts
    -

    ch376_wr_usb_data

    Description

    Send data to usb device. First byte must be the the length to send

    @@ -2027,29 +1274,6 @@

    ch376_wr_usb_data

    data: ; length, set port feature, set feature, port_power,0, Id port, 0, 0, 0 .byte 8,$23,3,8,0,1,0,0 - -

    ch376_wr_usb_data

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    Input

    - -

    Modify

    - -

    Example

    -
     lda #<data
    - ldx #>data
    - jsr ch376_wr_usb_data
    - rts
    -data:
    - ; length, set port feature, set feature, port_power,0, Id port, 0, 0, 0
    - .byte 8,$23,3,8,0,1,0,0
     

    @@ -2057,7 +1281,7 @@

    ch376_wr_usb_data

    Last update: - 2024-01-27 + 2024-01-28 diff --git a/docs/api/2024.2/c/index.html b/docs/api/2024.2/c/index.html index 6179dc3..28bd9c7 100644 --- a/docs/api/2024.2/c/index.html +++ b/docs/api/2024.2/c/index.html @@ -71,7 +71,7 @@
    - + Skip to content @@ -392,6 +392,8 @@ + +
    + + + + + +
    +
    +
    + + + - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - -

    C

    - -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    unsigned char ch376_check_exist(void);

    -

    Description

    -

    If ch376 is present, it will return 0XAA

    -

    Returns

    -

    0XAA if it's OK

    -

    unsigned char ch376_check_exist(void);

    + +
    +
    + + + + +
    +
    + + + + +

    C

    +

    unsigned char ch376_check_exist(void);

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create a folder

    -

    unsigned char ch376_dir_create();

    +

    unsigned char ch376_dir_create();

    Description

    create a folder

    -

    ch376_disk_capacity();

    -

    Description

    -

    check disk capacity

    -
    -

    Impossible to use

    -
    -

    ch376_disk_capacity();

    +

    ch376_disk_capacity();

    Description

    check disk capacity

    Impossible to use

    -

    unsigned char ch376_disk_mount(void);

    -

    Description

    -

    perform a disk mount

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_disk_mount(void);

    +

    unsigned char ch376_disk_mount(void);

    Description

    perform a disk mount

    Returns

    ch376 status values

    -

    void ch376_disk_query(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_disk_query(void);

    +

    void ch376_disk_query(void);

    Impossible to use

    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_file_close();

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_dir_create();

    -

    Description

    -

    create file

    +

    unsigned char ch376_file_close();

    Returns

    ch376 status values

    -

    unsigned char ch376_dir_create();

    +

    unsigned char ch376_dir_create();

    Description

    create file

    Returns

    ch376 status values

    -

    unsigned char ch376_file_erase();

    -

    Description

    -

    erase file

    -

    Returns

    -

    ch376 status value

    -

    unsigned char ch376_file_erase();

    +

    unsigned char ch376_file_erase();

    Description

    erase file

    Returns

    ch376 status value

    -

    unsigned char ch376_file_open(void);

    -

    Description

    -

    open file

    -

    Returns

    -

    'ch376 status' value

    -

    unsigned char ch376_file_open(void);

    +

    unsigned char ch376_file_open(void);

    Description

    open file

    Returns

    'ch376 status' value

    -

    unsigned char ch376_get_descr(unsigned char mode);

    -

    Description

    -

    Get usb descr device

    -

    Returns

    -

    ch376 status values

    -

    unsigned char ch376_get_descr(unsigned char mode);

    +

    unsigned char ch376_get_descr(unsigned char mode);

    Description

    Get usb descr device

    Returns

    ch376 status values

    -

    void ch376_get_file_size(void);

    -
    -

    Impossible to use

    -
    -

    void ch376_get_file_size(void);

    +

    void ch376_get_file_size(void);

    Impossible to use

    -

    unsigned char ch376_ic_get_version(void);

    -

    Description

    -

    Get ch376 firmware version

    -

    Returns

    -

    ch376 firmware version

    -

    unsigned char ch376_ic_get_version(void);

    +

    unsigned char ch376_ic_get_version(void);

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    -

    void ch376_issue_token_x(unsigned char token)

    -

    Description

    -

    Send Token for control transfert

    -

    void ch376_issue_token_x(unsigned char token)

    +

    void ch376_issue_token_x(unsigned char token)

    Description

    Send Token for control transfert

    -

    unsigned char ch376_lib_version(void);

    -

    Description

    -

    Get lib version

    -

    Returns

    -

    ch376 lib version

    -

    unsigned char ch376_lib_version(void);

    +

    unsigned char ch376_lib_version(void);

    Description

    Get lib version

    Returns

    ch376 lib version

    -

    void ch376_reset_all(void);

    -

    Description

    -

    reset CH376

    -

    void ch376_reset_all(void);

    +

    void ch376_reset_all(void);

    Description

    reset CH376

    -

    unsigned int ch376_seek_file(long position);

    -

    Description

    -

    Seek file

    -

    Returns

    -

    ch376 status values

    -

    unsigned int ch376_seek_file(long position);

    +

    unsigned int ch376_seek_file(long position);

    Description

    Seek file

    Returns

    ch376 status values

    -

    void ch376_set_address(unsigned char adress);

    -

    Description

    -

    set usb address

    -

    void ch376_set_address(unsigned char adress);

    +

    void ch376_set_address(unsigned char adress);

    Description

    set usb address

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_bytes_write(unsigned int nb);

    -

    void ch376_set_bytes_read(unsigned int nb);

    -

    void ch376_set_config(unsigned char config);

    -

    Description

    -

    set config for usb device

    -

    void ch376_set_config(unsigned char config);

    +

    void ch376_set_bytes_write(unsigned int nb);

    +

    void ch376_set_bytes_read(unsigned int nb);

    +

    void ch376_set_config(unsigned char config);

    Description

    set config for usb device

    -

    void ch376_set_file_name(char *filename);

    -

    Description

    -

    set file_name

    -

    void ch376_set_file_name(char *filename);

    +

    void ch376_set_file_name(char *filename);

    Description

    set file_name

    -

    void ch376_set_usb_addr(unsigned char adress);

    -

    Description

    -

    set usb_address

    -

    void ch376_set_usb_addr(unsigned char adress);

    +

    void ch376_set_usb_addr(unsigned char adress);

    Description

    set usb_address

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_mode(unsigned char mode);

    -

    Description

    -

    Set usb mode

    -

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    +

    void ch376_set_usb_mode(unsigned char mode);

    Description

    Set usb mode

    Input

    -

    void ch376_set_usb_speed(unsigned char speed);

    +

    void ch376_set_usb_speed(unsigned char speed);

    Description

    Set usb mode

    Input

    -

    unsigned char ch376_wait_response(void);

    -

    Description

    -

    Perform wait_response

    -

    Returns

    -

    "ch376 status" values

    -

    unsigned char ch376_wait_response(void);

    +

    unsigned char ch376_wait_response(void);

    Description

    Perform wait_response

    Returns

    "ch376 status" values

    -

    void ch376_wr_usb_data(char *data);

    -

    Description

    -

    Send data to usb device. First byte must be the the length to send

    -

    void ch376_wr_usb_data(char *data);

    +

    void ch376_wr_usb_data(char *data);

    Description

    Send data to usb device. First byte must be the the length to send

    @@ -7443,7 +968,7 @@

    void ch376_wr_usb_data(char *data);< Last update: - 2024-01-27 + 2024-01-28

    diff --git a/docs/api/2024.2/ch376.inc/index.html b/docs/api/2024.2/ch376.inc/index.html index ce32fe4..6f0aaa4 100644 --- a/docs/api/2024.2/ch376.inc/index.html +++ b/docs/api/2024.2/ch376.inc/index.html @@ -663,7 +663,7 @@

    ch376.inc

    Last update: - 2024-01-27 + 2024-01-28 diff --git a/docs/api/assembly/index.html b/docs/api/assembly/index.html index 543778a..8163dd7 100644 --- a/docs/api/assembly/index.html +++ b/docs/api/assembly/index.html @@ -425,6 +425,182 @@ + + + @@ -438,7 +614,447 @@ -

    Assembly

    +

    Assembly

    +

    ch376_check_exist

    +

    Description

    +

    If ch376 is present, it will return $AA

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_check_exist
    + cmp #$AA
    + beq @exists
    + rts ; Does not exist
    +@exists:
    +...
    +
    +

    ch376_dir_create

    +

    Description

    +

    create a folder

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_dir_create
    + ; check accumulator here ch376_wait_response had been launched by ch376_dir_create
    +
    +

    ch376_disk_capacity

    +

    Description

    +

    check disk capacity

    +
    +

    Impossible to use

    +
    +

    ch376_disk_mount

    +

    Description

    +

    perform a disk mount

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_disk_mount
    + ; check accumulator here ch376_wait_response had been launched by ch376_disk_mount
    +
    +

    ch376_disk_query

    +
    +

    Impossible to use

    +
    +

    ch376_file_close

    +

    Description

    +

    Close file

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_file_close
    + ; check accumulator here ch376_wait_response had been launched by ch376_file_close
    +
    +

    ch376_file_create

    +

    Description

    +

    create file

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_file_create
    + ; check accumulator here ch376_wait_response had been launched by ch376_file_create
    +
    +

    ch376_file_erase

    +

    Description

    +

    Erase file

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_file_erase
    + ; Check accumulator here :
    + ; Ch376_wait_response had been launched
    + ; By ch376_file_erase
    +
    +

    ch376_file_open

    +

    Description

    +

    open file

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_file_erase
    + ; check accumulator here ch376_wait_response had been launched by ch376_file_open
    + rts
    +
    +

    ch376_get_descr

    +

    Description

    +

    Get usb descr device

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_get_descr
    + ; check accumulator here ch376_wait_response had been launched by ch376_get_descr
    + rts
    +
    +

    ch376_get_file_size

    +

    Description

    +

    Get file size

    +
    +

    Impossible to use

    +
    +

    ch376_ic_get_ver

    +

    Description

    +

    Get ch376 firmware version

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_ic_get_ver
    + ; check accumulator for Version (integer value)
    +
    +

    ch376_issue_token_x

    +

    Description

    +

    Send Token for control transfert

    +

    Input

    + +

    Modify

    + +

    Returns

    + +

    Example

    +
     lda #$80
    + jsr ch376_issue_token_x
    + ; check accumulator for ch376 status
    +
    +

    ch376_lib_version

    +

    Description

    +

    Get lib version

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_lib_version
    + cmp #CH376_LIB_VERSION_2024_2
    + beq @right_version
    + ; Wrong version
    +...
    + rts
    +@right_version:
    +...
    + rts
    +
    +

    ch376_reset_all

    +

    Description

    +

    reset CH376

    +

    Modify

    + +

    Example

    +
     jsr ch376_reset_all
    + rts
    +
    +

    ch376_seek_file

    +

    Description

    +

    Seek file. Performs a wait_response

    +

    Input

    + +

    Modify

    + +

    Returns

    + +

    Example

    +
     lda #$04
    + sta RES
    + lda #$01
    + ldy #$02
    + ldx #$03
    + jsr ch376_seek_file
    + ; check accumulator here ch376_wait_response had been launched by ch376_seek_file
    +
    +
    +

    Not tested

    +
    +

    ch376_set_address

    +

    Description

    +

    set usb address

    +

    Modify

    + +

    Example

    +
     lda #$02
    + jsr ch376_set_address
    +
    +

    endproc +proc ch376_set_bytes_read + ;;@brief Set bytes to read. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip + ;;@inputA Low value + ;;@inputY High value + ;;@modifyX + ;;@modifyA + ;;@ca65 + ;;@` lda #$02 + ;;@` ldy #$10 + ;;@` jsr ch376_set_bytes_read + ;;@ + ldx #CH376_BYTE_READ + .byt $2C ; jump 2 bytes with the hack bit $xxxx +rite_entry_point: + ldx #CH376_BYTE_WRITE + stx CH376_COMMAND + sta CH376_DATA + sty CH376_DATA +IFPC02 +pc02 + stz CH376_DATA + stz CH376_DATA +p02 +else + lda #$00 + sta CH376_DATA + sta CH376_DATA +endif + jmp _ch376_wait_response +endproc +proc ch376_set_bytes_write + ;;@brief Set bytes to write. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip + ;;@inputA Low value + ;;@inputY High value + ;;@modifyX + ;;@modifyA + ;;@ca65 + ;;@` lda #$02 + ;;@` ldy #$10 + ;;@` jsr ch376_set_bytes_write + ;;@ + jmp ch376_set_bytes_read::write_entry_point +endproc

    +

    ch376_set_config

    +

    Description

    +

    set config for usb device

    +

    Input

    + +

    Modify

    + +

    Example

    +
     lda #$02
    + jsr ch376_set_config
    +
    +

    ch376_set_file_name

    +

    Description

    +

    set file_name

    +

    Input

    + +

    Modify

    + +

    Example

    +
     lda #<myfile
    + ldy #>myfile
    + jsr ch376_set_file_name
    + rts
    +myfile:
    + .byte "hello.txt"
    +
    +

    ch376_set_usb_addr

    +

    Description

    +

    set usb_address

    +

    Input

    + +

    Modify

    + +

    Example

    +
    ; Set usb addr
    + lda #$02
    + jsr ch376_set_usb_addr
    + rts
    +
    +

    ch376_set_usb_mode

    +

    Description

    +

    Set usb mode

    +

    Input

    + +

    Modify

    + +

    Example

    +
     lda #CH376_USB_MODE_HOST_RESET
    + jsr ch376_set_usb_mode
    + rts
    +
    +

    ch376_set_usb_speed

    +

    Description

    +

    Set usb mode

    +

    Input

    + +

    Modify

    + +

    Example

    +
     lda #$02
    + jsr ch376_set_usb_speed
    + rts
    +
    +

    ch376_wait_response

    +

    Description

    +

    Perform wait_response. It's not needed to call because some commands already perform ch376_wait_response

    +

    Modify

    + +

    Returns

    + +

    Example

    +
     jsr ch376_wait_response
    + rts
    +
    +

    ch376_wr_usb_data

    +

    Description

    +

    Send data to usb device. First byte must be the the length to send

    +

    Input

    + +

    Modify

    + +

    Example

    +
     lda #<data
    + ldx #>data
    + jsr ch376_wr_usb_data
    + rts
    +data:
    + ; length, set port feature, set feature, port_power,0, Id port, 0, 0, 0
    + .byte 8,$23,3,8,0,1,0,0
    +

    diff --git a/docs/api/c/index.html b/docs/api/c/index.html index cd84bc9..98dfe44 100644 --- a/docs/api/c/index.html +++ b/docs/api/c/index.html @@ -425,6 +425,196 @@ + + +
    @@ -438,7 +628,108 @@ -

    C

    +

    C

    +

    unsigned char ch376_check_exist(void);

    +

    Description

    +

    If ch376 is present, it will return 0XAA

    +

    Returns

    +

    0XAA if it's OK

    +

    unsigned char ch376_dir_create();

    +

    Description

    +

    create a folder

    +

    ch376_disk_capacity();

    +

    Description

    +

    check disk capacity

    +
    +

    Impossible to use

    +
    +

    unsigned char ch376_disk_mount(void);

    +

    Description

    +

    perform a disk mount

    +

    Returns

    +

    ch376 status values

    +

    void ch376_disk_query(void);

    +
    +

    Impossible to use

    +
    +

    unsigned char ch376_file_close();

    +

    Returns

    +

    ch376 status values

    +

    unsigned char ch376_dir_create();

    +

    Description

    +

    create file

    +

    Returns

    +

    ch376 status values

    +

    unsigned char ch376_file_erase();

    +

    Description

    +

    erase file

    +

    Returns

    +

    ch376 status value

    +

    unsigned char ch376_file_open(void);

    +

    Description

    +

    open file

    +

    Returns

    +

    'ch376 status' value

    +

    unsigned char ch376_get_descr(unsigned char mode);

    +

    Description

    +

    Get usb descr device

    +

    Returns

    +

    ch376 status values

    +

    void ch376_get_file_size(void);

    +
    +

    Impossible to use

    +
    +

    unsigned char ch376_ic_get_version(void);

    +

    Description

    +

    Get ch376 firmware version

    +

    Returns

    +

    ch376 firmware version

    +

    void ch376_issue_token_x(unsigned char token)

    +

    Description

    +

    Send Token for control transfert

    +

    unsigned char ch376_lib_version(void);

    +

    Description

    +

    Get lib version

    +

    Returns

    +

    ch376 lib version

    +

    void ch376_reset_all(void);

    +

    Description

    +

    reset CH376

    +

    unsigned int ch376_seek_file(long position);

    +

    Description

    +

    Seek file

    +

    Returns

    +

    ch376 status values

    +

    void ch376_set_address(unsigned char adress);

    +

    Description

    +

    set usb address

    +

    void ch376_set_bytes_write(unsigned int nb);

    +

    void ch376_set_bytes_read(unsigned int nb);

    +

    void ch376_set_config(unsigned char config);

    +

    Description

    +

    set config for usb device

    +

    void ch376_set_file_name(char *filename);

    +

    Description

    +

    set file_name

    +

    void ch376_set_usb_addr(unsigned char adress);

    +

    Description

    +

    set usb_address

    +

    void ch376_set_usb_mode(unsigned char mode);

    +

    Description

    +

    Set usb mode

    +

    Input

    +

    void ch376_set_usb_speed(unsigned char speed);

    +

    Description

    +

    Set usb mode

    +

    Input

    +

    unsigned char ch376_wait_response(void);

    +

    Description

    +

    Perform wait_response

    +

    Returns

    +

    "ch376 status" values

    +

    void ch376_wr_usb_data(char *data);

    +

    Description

    +

    Send data to usb device. First byte must be the the length to send


    diff --git a/docs/api/search/search_index.json b/docs/api/search/search_index.json index 9ab2ee2..b9ddc02 100644 --- a/docs/api/search/search_index.json +++ b/docs/api/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":"

    This lib is used to manage ch376 chip for 6502 cpu

    "},{"location":"assembly/","title":"Assembly","text":""},{"location":"c/","title":"C","text":""},{"location":"2024.2/assembly/","title":"Assembly","text":""},{"location":"2024.2/assembly/#assembly","title":"Assembly","text":""},{"location":"2024.2/assembly/#ch376_check_exist","title":"ch376_check_exist","text":"

    Description

    If ch376 is present, it will return $AA

    Modify

    Returns

    Example

     jsr ch376_check_exist\ncmp #$AA\nbeq @exists\nrts ; Does not exist\n@exists:\n...\n
    "},{"location":"2024.2/assembly/#ch376_check_exist_1","title":"ch376_check_exist","text":"

    Description

    If ch376 is present, it will return $AA

    Modify

    Returns

    Example

     jsr ch376_check_exist\ncmp #$AA\nbeq @exists\nrts ; Does not exist\n@exists:\n...\n
    "},{"location":"2024.2/assembly/#ch376_dir_create","title":"ch376_dir_create","text":"

    Description

    create a folder

    Modify

    Returns

    Example

     jsr ch376_dir_create\n; check accumulator here ch376_wait_response had been launched by ch376_dir_create\n
    "},{"location":"2024.2/assembly/#ch376_dir_create_1","title":"ch376_dir_create","text":"

    Description

    create a folder

    Modify

    Returns

    Example

     jsr ch376_dir_create\n; check accumulator here ch376_wait_response had been launched by ch376_dir_create\n
    "},{"location":"2024.2/assembly/#ch376_disk_capacity","title":"ch376_disk_capacity","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/assembly/#ch376_disk_capacity_1","title":"ch376_disk_capacity","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/assembly/#ch376_disk_mount","title":"ch376_disk_mount","text":"

    Description

    perform a disk mount

    Modify

    Returns

    Example

     jsr ch376_disk_mount\n; check accumulator here ch376_wait_response had been launched by ch376_disk_mount\n
    "},{"location":"2024.2/assembly/#ch376_disk_mount_1","title":"ch376_disk_mount","text":"

    Description

    perform a disk mount

    Modify

    Returns

    Example

     jsr ch376_disk_mount\n; check accumulator here ch376_wait_response had been launched by ch376_disk_mount\n
    "},{"location":"2024.2/assembly/#ch376_disk_query","title":"ch376_disk_query","text":"

    Impossible to use

    "},{"location":"2024.2/assembly/#ch376_disk_query_1","title":"ch376_disk_query","text":"

    Impossible to use

    "},{"location":"2024.2/assembly/#ch376_file_close","title":"ch376_file_close","text":"

    Description

    Close file

    Modify

    Returns

    Example

     jsr ch376_file_close\n; check accumulator here ch376_wait_response had been launched by ch376_file_close\n
    "},{"location":"2024.2/assembly/#ch376_file_close_1","title":"ch376_file_close","text":"

    Description

    Close file

    Modify

    Returns

    Example

     jsr ch376_file_close\n; check accumulator here ch376_wait_response had been launched by ch376_file_close\n
    "},{"location":"2024.2/assembly/#ch376_file_create","title":"ch376_file_create","text":"

    Description

    create file

    Modify

    Returns

    Example

     jsr ch376_file_create\n; check accumulator here ch376_wait_response had been launched by ch376_file_create\n
    "},{"location":"2024.2/assembly/#ch376_file_create_1","title":"ch376_file_create","text":"

    Description

    create file

    Modify

    Returns

    Example

     jsr ch376_file_create\n; check accumulator here ch376_wait_response had been launched by ch376_file_create\n
    "},{"location":"2024.2/assembly/#ch376_file_erase","title":"ch376_file_erase","text":"

    Description

    Erase file

    Modify

    Returns

    Example

     jsr ch376_file_erase\n; Check accumulator here :\n; Ch376_wait_response had been launched\n; By ch376_file_erase\n
    "},{"location":"2024.2/assembly/#ch376_file_erase_1","title":"ch376_file_erase","text":"

    Description

    Erase file

    Modify

    Returns

    Example

     jsr ch376_file_erase\n; Check accumulator here :\n; Ch376_wait_response had been launched\n; By ch376_file_erase\n
    "},{"location":"2024.2/assembly/#ch376_file_open","title":"ch376_file_open","text":"

    Description

    open file

    Modify

    Returns

    Example

     jsr ch376_file_erase\n; check accumulator here ch376_wait_response had been launched by ch376_file_open\nrts\n
    "},{"location":"2024.2/assembly/#ch376_file_open_1","title":"ch376_file_open","text":"

    Description

    open file

    Modify

    Returns

    Example

     jsr ch376_file_erase\n; check accumulator here ch376_wait_response had been launched by ch376_file_open\nrts\n
    "},{"location":"2024.2/assembly/#ch376_get_descr","title":"ch376_get_descr","text":"

    Description

    Get usb descr device

    Modify

    Returns

    Example

     jsr ch376_get_descr\n; check accumulator here ch376_wait_response had been launched by ch376_get_descr\nrts\n
    "},{"location":"2024.2/assembly/#ch376_get_descr_1","title":"ch376_get_descr","text":"

    Description

    Get usb descr device

    Modify

    Returns

    Example

     jsr ch376_get_descr\n; check accumulator here ch376_wait_response had been launched by ch376_get_descr\nrts\n
    "},{"location":"2024.2/assembly/#ch376_get_file_size","title":"ch376_get_file_size","text":"

    Description

    Get file size

    Impossible to use

    "},{"location":"2024.2/assembly/#ch376_get_file_size_1","title":"ch376_get_file_size","text":"

    Description

    Get file size

    Impossible to use

    "},{"location":"2024.2/assembly/#ch376_ic_get_ver","title":"ch376_ic_get_ver","text":"

    Description

    Get ch376 firmware version

    Modify

    Returns

    Example

     jsr ch376_ic_get_ver\n; check accumulator for Version (integer value)\n
    "},{"location":"2024.2/assembly/#ch376_ic_get_ver_1","title":"ch376_ic_get_ver","text":"

    Description

    Get ch376 firmware version

    Modify

    Returns

    Example

     jsr ch376_ic_get_ver\n; check accumulator for Version (integer value)\n
    "},{"location":"2024.2/assembly/#ch376_issue_token_x","title":"ch376_issue_token_x","text":"

    Description

    Send Token for control transfert

    Input

    Modify

    Returns

    Example

     lda #$80\njsr ch376_issue_token_x\n; check accumulator for ch376 status\n
    "},{"location":"2024.2/assembly/#ch376_issue_token_x_1","title":"ch376_issue_token_x","text":"

    Description

    Send Token for control transfert

    Input

    Modify

    Returns

    Example

     lda #$80\njsr ch376_issue_token_x\n; check accumulator for ch376 status\n
    "},{"location":"2024.2/assembly/#ch376_lib_version","title":"ch376_lib_version","text":"

    Description

    Get lib version

    Modify

    Returns

    Example

     jsr ch376_lib_version\ncmp #CH376_LIB_VERSION_2024_2\nbeq @right_version\n; Wrong version\n...\nrts\n@right_version:\n...\nrts\n
    "},{"location":"2024.2/assembly/#ch376_lib_version_1","title":"ch376_lib_version","text":"

    Description

    Get lib version

    Modify

    Returns

    Example

     jsr ch376_lib_version\ncmp #CH376_LIB_VERSION_2024_2\nbeq @right_version\n; Wrong version\n...\nrts\n@right_version:\n...\nrts\n
    "},{"location":"2024.2/assembly/#ch376_reset_all","title":"ch376_reset_all","text":"

    Description

    reset CH376

    Modify

    Example

     jsr ch376_reset_all\nrts\n
    "},{"location":"2024.2/assembly/#ch376_reset_all_1","title":"ch376_reset_all","text":"

    Description

    reset CH376

    Modify

    Example

     jsr ch376_reset_all\nrts\n
    "},{"location":"2024.2/assembly/#ch376_seek_file","title":"ch376_seek_file","text":"

    Description

    Seek file. Performs a wait_response

    Input

    Modify

    Returns

    Example

     lda #$04\nsta RES\nlda #$01\nldy #$02\nldx #$03\njsr ch376_seek_file\n; check accumulator here ch376_wait_response had been launched by ch376_seek_file\n

    Not tested

    "},{"location":"2024.2/assembly/#ch376_seek_file_1","title":"ch376_seek_file","text":"

    Description

    Seek file. Performs a wait_response

    Input

    Modify

    Returns

    Example

     lda #$04\nsta RES\nlda #$01\nldy #$02\nldx #$03\njsr ch376_seek_file\n; check accumulator here ch376_wait_response had been launched by ch376_seek_file\n

    Not tested

    "},{"location":"2024.2/assembly/#ch376_set_address","title":"ch376_set_address","text":"

    Description

    set usb address

    Modify

    Example

     lda #$02\njsr ch376_set_address\n
    "},{"location":"2024.2/assembly/#ch376_set_address_1","title":"ch376_set_address","text":"

    Description

    set usb address

    Modify

    Example

     lda #$02\njsr ch376_set_address\n

    endproc proc ch376_set_bytes_read ;;@brief Set bytes to read. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip ;;@inputA Low value ;;@inputY High value ;;@modifyX ;;@modifyA ;;@ca65 ;;@` lda #$02 ;;@` ldy #$10 ;;@` jsr ch376_set_bytes_read ;;@ ldx #CH376_BYTE_READ .byt $2C ; jump 2 bytes with the hack bit $xxxx rite_entry_point: ldx #CH376_BYTE_WRITE stx CH376_COMMAND sta CH376_DATA sty CH376_DATA IFPC02 pc02 stz CH376_DATA stz CH376_DATA p02 else lda #$00 sta CH376_DATA sta CH376_DATA endif jmp _ch376_wait_response endproc proc ch376_set_bytes_write ;;@brief Set bytes to write. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip ;;@inputA Low value ;;@inputY High value ;;@modifyX ;;@modifyA ;;@ca65 ;;@` lda #$02 ;;@` ldy #$10 ;;@` jsr ch376_set_bytes_write ;;@ jmp ch376_set_bytes_read::write_entry_point endproc endproc proc ch376_set_bytes_read ;;@brief Set bytes to read. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip ;;@inputA Low value ;;@inputY High value ;;@modifyX ;;@modifyA ;;@ca65 ;;@` lda #$02 ;;@` ldy #$10 ;;@` jsr ch376_set_bytes_read ;;@ ldx #CH376_BYTE_READ .byt $2C ; jump 2 bytes with the hack bit $xxxx rite_entry_point: ldx #CH376_BYTE_WRITE stx CH376_COMMAND sta CH376_DATA sty CH376_DATA IFPC02 pc02 stz CH376_DATA stz CH376_DATA p02 else lda #$00 sta CH376_DATA sta CH376_DATA endif jmp _ch376_wait_response endproc proc ch376_set_bytes_write ;;@brief Set bytes to write. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip ;;@inputA Low value ;;@inputY High value ;;@modifyX ;;@modifyA ;;@ca65 ;;@` lda #$02 ;;@` ldy #$10 ;;@` jsr ch376_set_bytes_write ;;@ jmp ch376_set_bytes_read::write_entry_point endproc

    "},{"location":"2024.2/assembly/#ch376_set_config","title":"ch376_set_config","text":"

    Description

    set config for usb device

    Input

    Modify

    Example

     lda #$02\njsr ch376_set_config\n
    "},{"location":"2024.2/assembly/#ch376_set_config_1","title":"ch376_set_config","text":"

    Description

    set config for usb device

    Input

    Modify

    Example

     lda #$02\njsr ch376_set_config\n
    "},{"location":"2024.2/assembly/#ch376_set_file_name","title":"ch376_set_file_name","text":"

    Description

    set file_name

    Input

    Modify

    Example

     lda #<myfile\nldy #>myfile\njsr ch376_set_file_name\nrts\nmyfile:\n.byte \"hello.txt\"\n
    "},{"location":"2024.2/assembly/#ch376_set_file_name_1","title":"ch376_set_file_name","text":"

    Description

    set file_name

    Input

    Modify

    Example

     lda #<myfile\nldy #>myfile\njsr ch376_set_file_name\nrts\nmyfile:\n.byte \"hello.txt\"\n
    "},{"location":"2024.2/assembly/#ch376_set_usb_addr","title":"ch376_set_usb_addr","text":"

    Description

    set usb_address

    Input

    Modify

    Example

    ; Set usb addr\nlda #$02\njsr ch376_set_usb_addr\nrts\n
    "},{"location":"2024.2/assembly/#ch376_set_usb_addr_1","title":"ch376_set_usb_addr","text":"

    Description

    set usb_address

    Input

    Modify

    Example

    ; Set usb addr\nlda #$02\njsr ch376_set_usb_addr\nrts\n
    "},{"location":"2024.2/assembly/#ch376_set_usb_mode","title":"ch376_set_usb_mode","text":"

    Description

    Set usb mode

    Input

    Modify

    Example

     lda #CH376_USB_MODE_HOST_RESET\njsr ch376_set_usb_mode\nrts\n
    "},{"location":"2024.2/assembly/#ch376_set_usb_mode_1","title":"ch376_set_usb_mode","text":"

    Description

    Set usb mode

    Input

    Modify

    Example

     lda #CH376_USB_MODE_HOST_RESET\njsr ch376_set_usb_mode\nrts\n
    "},{"location":"2024.2/assembly/#ch376_set_usb_speed","title":"ch376_set_usb_speed","text":"

    Description

    Set usb mode

    Input

    Modify

    Example

     lda #$02\njsr ch376_set_usb_speed\nrts\n
    "},{"location":"2024.2/assembly/#ch376_set_usb_speed_1","title":"ch376_set_usb_speed","text":"

    Description

    Set usb mode

    Input

    Modify

    Example

     lda #$02\njsr ch376_set_usb_speed\nrts\n
    "},{"location":"2024.2/assembly/#ch376_wait_response","title":"ch376_wait_response","text":"

    Description

    Perform wait_response. It's not needed to call because some commands already perform ch376_wait_response

    Modify

    Returns

    Example

     jsr ch376_wait_response\nrts\n
    "},{"location":"2024.2/assembly/#ch376_wait_response_1","title":"ch376_wait_response","text":"

    Description

    Perform wait_response. It's not needed to call because some commands already perform ch376_wait_response

    Modify

    Returns

    Example

     jsr ch376_wait_response\nrts\n
    "},{"location":"2024.2/assembly/#ch376_wr_usb_data","title":"ch376_wr_usb_data","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    Input

    Modify

    Example

     lda #<data\nldx #>data\njsr ch376_wr_usb_data\nrts\ndata:\n; length, set port feature, set feature, port_power,0, Id port, 0, 0, 0\n.byte 8,$23,3,8,0,1,0,0\n
    "},{"location":"2024.2/assembly/#ch376_wr_usb_data_1","title":"ch376_wr_usb_data","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    Input

    Modify

    Example

     lda #<data\nldx #>data\njsr ch376_wr_usb_data\nrts\ndata:\n; length, set port feature, set feature, port_power,0, Id port, 0, 0, 0\n.byte 8,$23,3,8,0,1,0,0\n
    "},{"location":"2024.2/c/","title":"C","text":""},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#ch376_disk_capacity","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_1","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_1","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_2","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_2","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_3","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#ch376_disk_capacity_1","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#ch376_disk_capacity_2","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_1","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_2","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_1","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_2","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_1","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_2","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_4","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_5","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_1","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_2","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_1","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_2","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_1","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_2","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_1","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_2","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_1","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_2","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_1","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_2","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_1","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_2","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_1","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_2","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_1","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_2","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_1","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_2","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_1","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_1","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_1","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_2","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_1","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_2","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_1","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_2","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_1","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_2","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_1","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_2","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_1","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_2","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_1","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_2","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_3","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_4","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_6","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_7","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#ch376_disk_capacity_3","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#ch376_disk_capacity_4","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_3","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_4","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_3","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_4","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_3","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_4","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_8","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_9","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_3","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_4","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_3","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_4","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_3","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_4","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_3","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_4","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_3","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_4","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_3","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_4","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_3","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_4","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_3","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_4","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_3","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_4","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_3","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_4","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_2","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_2","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_3","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_3","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_3","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_4","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_3","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_4","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_3","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_4","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_3","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_4","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_3","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_4","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_3","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_4","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_3","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_4","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_5","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_6","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_10","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_11","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#ch376_disk_capacity_5","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#ch376_disk_capacity_6","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_5","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_6","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_5","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_6","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_5","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_6","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_12","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_13","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_5","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_6","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_5","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_6","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_5","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_6","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_5","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_6","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_5","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_6","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_5","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_6","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_5","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_6","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_5","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_6","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_5","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_6","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_5","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_6","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_4","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_4","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_5","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_5","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_5","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_6","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_5","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_6","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_5","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_6","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_5","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_6","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_5","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_6","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_5","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_6","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_5","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_6","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_7","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_8","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_14","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_15","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#ch376_disk_capacity_7","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#ch376_disk_capacity_8","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_7","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_8","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_7","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_8","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_7","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_8","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_16","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_17","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_7","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_8","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_7","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_8","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_7","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_8","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_7","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_8","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_7","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_8","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_7","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_8","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_7","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_8","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_7","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_8","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_7","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_8","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_7","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_8","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_6","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_6","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_7","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_7","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_7","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_8","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_7","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_8","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_7","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_8","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_7","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_8","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_7","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_8","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_7","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_8","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_7","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_8","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_9","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_10","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_18","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_19","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#ch376_disk_capacity_9","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#ch376_disk_capacity_10","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_9","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_10","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_9","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_10","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_9","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_10","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_20","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_21","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_9","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_10","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_9","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_10","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_9","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_10","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_9","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_10","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_9","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_10","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_9","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_10","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_9","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_10","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_9","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_10","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_9","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_10","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_9","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_10","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_8","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_8","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_9","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_9","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_9","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_10","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_9","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_10","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_9","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_10","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_9","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_10","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_9","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_10","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_9","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_10","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_9","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_10","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_11","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_12","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_22","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_23","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#ch376_disk_capacity_11","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#ch376_disk_capacity_12","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_11","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_12","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_11","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_12","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_11","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_12","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_24","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_25","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_11","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_12","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_11","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_12","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_11","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_12","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_11","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_12","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_11","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_12","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_11","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_12","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_11","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_12","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_11","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_12","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_11","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_12","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_11","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_12","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_10","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_10","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_11","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_11","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_11","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_12","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_11","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_12","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_11","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_12","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_11","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_12","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_11","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_12","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_11","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_12","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_11","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_12","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_13","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid_14","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_26","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_27","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#ch376_disk_capacity_13","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#ch376_disk_capacity_14","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_13","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid_14","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_13","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid_14","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_13","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close_14","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_28","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_29","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_13","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase_14","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_13","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid_14","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_13","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode_14","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_13","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid_14","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_13","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid_14","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_13","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token_14","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_13","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid_14","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_13","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid_14","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_13","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position_14","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_13","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress_14","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_12","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_12","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb_13","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb_13","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_13","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config_14","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_13","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename_14","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_13","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress_14","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_13","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode_14","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_13","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed_14","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_13","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid_14","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_13","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data_14","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/ch376.inc/","title":"ch376.inc","text":"

    CH376_LIB_VERSION_2023_4 = $00 CH376_LIB_VERSION_2024_1 = $01 CH376_LIB_VERSION_2024_2 = $02 * CH376_DETECTED = $AA * CH376_NONE = $00 CH376_GET_IC_VER = $01 CH376_SET_BAUDRATE = $02 CH376_GET_ENTER_SLEEP = $03 CH276_SET_USB_SPEED = $04 CH376_RESET_ALL = $05 CH376_CHECK_EXIST = $06 CH376_GET_REGISTER = $0A CH376_GET_DEV_RATE = $0A CH376_SET_REGISTER = $0B CH376_SET_SD0 = $0B CH376_WRITE_VAR8 = $0B CH376_GET_FILE_SIZE = $0C ; Get the current file length CH376_READ_VAR32 = $0C CH376_WRITE_VAR32 = $0D CH376_DELAY_100US = $0F CH376_SET_USB_ADDR = $13 CH376_SET_USB_MODE = $15 CH376_TEST_CONNECT = $16 CH376_ABORT_NAK = $17 CH376_SET_EP0_RX = $18 CH376_SET_EP0_TX = $19 CH376_SET_EP1_RX = $1A CH376_SET_EP1_TX = $1B CH376_SET_EP2_RX = $1C CH376_SET_EP2_TX = $1D CH376_GET_STATUS = $22 CH376_UNLOCK_USB = $23 ; From CH375 datasheet CH376_DIRTY_BUFFER = $25 CH376_RD_USB_DATA0 = $27 CH376_RD_USB_DATA_UNLOCK = $28 ; From CH375 datasheet CH376_WR_EP0 = $29 ; DATA3 CH376_WR_EP1 = $2A ; DATA5 CH376_WR_EP2 = $2B ; DATA7 CH376_WR_USB_DATA = $2C CH376_WR_REQ_DATA = $2D CH376_OFS_DATA = $2E CH376_SET_FILE_NAME = $2F CH376_DISK_CONNECT = $30 ; check the disk connection status CH376_DISK_MOUNT = $31 CH376_FILE_OPEN = $32 CH376_FILE_ENUM_GO = $33 CH376_CMD_FILE_CREATE = $34 CH376_FILE_ERASE = $35 CH376_FILE_CLOSE = $36 CH376_DIR_INFO_READ = $37 CH376_DIR_INFO_SAVE = $38 CH376_BYTE_LOCATE = $39 CH376_BYTE_READ = $3A CH376_BYTE_RD_GO = $3B CH376_BYTE_WRITE = $3C CH376_BYTE_WR_GO = $3D CH376_DISK_CAPACITY = $3E CH376_DISK_QUERY = $3F CH376_DIR_CREATE = $40 CH376_CLR_STALL = $41 CH376_SET_ADRESS = $45 CH376_CMD_GET_DESCR = $46 CH376_CMD_SET_CONFIG = $49 ; Set USB configuration CH376_SEC_READ = $4B CH376_SEC_WRITE = $4C CH376_AUTO_SETUP = $4D CH376_ISSUE_TKN_X = $4E ; Send synchronization token and execute transactions CH376_DISC_BOC = $50 CH376_DISK_INIT = $51 ; Init USB memory CH376_DISK_RESET = $52 CH376_DISK_SIZE = $53 ; Get The maximum capacity of the USB memory CH376_DISC_READ = $54 CH376_DISK_RD_GO = $55 CH376_DISK_WRITE = $56 CH376_DISK_WR_GO = $57 CH376_DISK_INQUIRY = $58 CH376_DISK_READY = $59 CH376_DISK_R_SENSE = $5A CH376_RD_DISK_SEC = $5B CH376_WR_DISK_SEC = $5C CH376_DISK_MAX_LUN = $5D * ; CODE FOR CH376_SET_USB_MODE * CH376_USB_MODE_DEVICE_INVALID = $00 CH376_USB_MODE_DEVICE_OUTER_FW = $01 CH376_USB_MODE_DEVICE_INNER_FW = $02 CH376_USB_MODE_CODE_SDCARD = $03 ; The code of 06H means switch to valid USB-HOST, produce SOF package automatically. CH376_USB_MODE_CODE_USB_HOST_SOF_PACKAGE_AUTOMATICALLY = $06 CH376_USB_MODE_HOST_RESET = $07 * CH376_ERR_OPEN_DIR = $41 CH376_ERR_MISS_FILE = $42 CH376_ERR_FOUND_NAME = $43 CH376_ERR_DISK_DISCON = $82 CH376_ERR_LARGE_SECTOR = $84 CH376_ERR_TYPE_ERROR = $92 CH376_ERR_BPB_ERROR = $A1 CH376_ERR_DISK_FULL = $B1 CH376_ERR_FDT_OVER = $B2 CH376_ERR_FILE_CLOSE = $B4 * * CH376_USB_INT_SUCCESS = $14 CH376_USB_INT_CONNECT = $15 CH376_USB_INT_DISCONNECT = $16 CH376_USB_INT_BUF_OVER = $17 CH376_USB_INT_USB_READY = $18 CH376_USB_INT_DISK_READ = $1D CH376_USB_INT_DISK_WRITE = $1E CH376_USB_INT_DISK_ERR = $1F * CH376_ST_RET_SUCCESS = $51 CH376_ST_RET_ABORT = $5F * * * ; / * Informations de base du syst\u00e8me actuel * / ; / * Le bit 6 est utilis\u00e9 pour indiquer la sous-classe du p\u00e9riph\u00e9rique de stockage USB SubClass-Code, le bit 6 est 0 pour indiquer que la sous-classe est 6 et le bit 6 est 1 pour indiquer que la sous-classe est diff\u00e9rente de 6 * / ; / * Le bit 5 est utilis\u00e9 pour indiquer l'\u00e9tat de la configuration USB en mode p\u00e9riph\u00e9rique USB et l'\u00e9tat de la connexion du p\u00e9riph\u00e9rique USB en mode h\u00f4te USB * / ; / * En mode p\u00e9riph\u00e9rique USB, si le bit 5 est 1, la configuration USB est termin\u00e9e et les bits 5 et 0 ne sont pas configur\u00e9s * / ; / * En mode h\u00f4te USB, si le bit 5 est 1, il y a un p\u00e9riph\u00e9rique USB dans le port USB, et si le bit 5 est 0, il n'y a pas de p\u00e9riph\u00e9rique USB dans le port USB * / ; / * Le bit 4 est utilis\u00e9 pour indiquer l'\u00e9tat de verrouillage du tampon en mode p\u00e9riph\u00e9rique USB. Le bit 4 est 1 signifie que le tampon USB est verrouill\u00e9 et le bit 6 est 1 signifie qu'il a \u00e9t\u00e9 lib\u00e9r\u00e9 * / ; / * Autres bits, r\u00e9serv\u00e9s, veuillez ne pas modifier * / VAR_SYS_BASE_INFO = $20 * ; / * Nombre de tentatives d'op\u00e9ration de transaction USB * / ; / * Si le bit 7 est 0, il ne r\u00e9essayera pas lorsque NAK est re\u00e7u, le bit 7 est 1 et le bit 6 est 0, et r\u00e9essayera \u00e0 l'infini lors de la r\u00e9ception de NAK (vous pouvez utiliser la commande CMD_ABORT_NAK pour abandonner la nouvelle tentative), le bit 7 est 1 et 6 est 1 R\u00e9essayez au plus 3 secondes lors de la r\u00e9ception de NAK * / ; / * Bit 5 ~ Bit 0 repr\u00e9sente le nombre de tentatives apr\u00e8s l'expiration du d\u00e9lai * / VAR_RETRY_TIMES = $25 * ; / * Indicateur de bit en mode fichier h\u00f4te * / ; / * Bit 1 et Bit 0, l'indicateur du syst\u00e8me de fichiers FAT du disque logique, 00-FAT12, 01-FAT16, 10-FAT32, 11-ill\u00e9gal * / ; / * Bit 2, indique si les donn\u00e9es de la table FAT dans le tampon courant ont \u00e9t\u00e9 modifi\u00e9es, 0-non modifi\u00e9, 1-modifi\u00e9 * / ; / * Bit 3, la longueur du fichier doit \u00eatre modifi\u00e9e, le fichier actuel est ajout\u00e9 avec les donn\u00e9es, 0-Aucune modification n'est pas ajout\u00e9e, 1-Ajout\u00e9 et doit \u00eatre modifi\u00e9 * / ; / * Autres bits, r\u00e9serv\u00e9s, veuillez ne pas modifier * / VAR_FILE_BIT_FLAG = $26 * ; / * \u00c9tat du disque et du fichier en mode fichier h\u00f4te * / ; VAR_SD_BIT_FLAG 0x30 / * Indicateur de bit de la carte SD en mode fichier h\u00f4te * / ; / * Bit 0, version de la carte SD, 0- prend uniquement en charge la premi\u00e8re version SD, 1- prend en charge la deuxi\u00e8me version SD * / ; / * Bit 1, reconnaissance automatique, carte 0-SD, carte 1-MMC * / ; / * Bit 2, identification automatique, carte SD de capacit\u00e9 standard 0, carte SD 1 grande capacit\u00e9 (HC-SD) * / ; / * Bit 4, d\u00e9lai d'expiration de la commande ACMD41 * / ; / * Bit 5, d\u00e9lai d'expiration de la commande CMD1 * / ; / * Bit 6, d\u00e9lai d'expiration de la commande CMD58 * / ; / * Autres bits, r\u00e9serv\u00e9s, veuillez ne pas modifier * / VAR_DISK_STATUS = $2B * ; / * L'indicateur de synchronisation du point de terminaison BULK-IN / BULK-OUT du p\u00e9riph\u00e9rique de stockage USB * / ; / * Bit 7, indicateur de synchronisation de point de terminaison en bloc * / ; / * Bit 6, indicateur de synchronisation de point de terminaison en bloc * / ; / * Bit 5 ~ Bit 0, doit \u00eatre 0 * / VAR_UDISK_TOGGLE = $31 * ; / * Le num\u00e9ro d'unit\u00e9 logique du p\u00e9riph\u00e9rique de stockage USB * / ; / * Bit 7 ~ Bit 4, le num\u00e9ro d'unit\u00e9 logique actuel du p\u00e9riph\u00e9rique de stockage USB, apr\u00e8s que CH376 initialise le p\u00e9riph\u00e9rique de stockage USB, la valeur par d\u00e9faut est d'acc\u00e9der \u00e0 0 # unit\u00e9 logique * / ; / * Bit 3 ~ Bit 0, le num\u00e9ro d'unit\u00e9 logique maximum du p\u00e9riph\u00e9rique de stockage USB, plus 1 est \u00e9gal au nombre d'unit\u00e9s logiques * / VAR_UDISK_LUN = $34 * ; / * Le nombre de secteurs par cluster du disque logique * / VAR_SEC_PER_CLUS = $38 ; / * Le num\u00e9ro d'index des informations de r\u00e9pertoire de fichiers en cours dans le secteur * / VAR_FILE_DIR_INDEX = $3B * ; / * Le d\u00e9calage de secteur du pointeur de fichier actuel dans le cluster, 0xFF pointe vers la fin du fichier, la fin du cluster * / VAR_CLUS_SEC_OFS = $3C * ;/ * Variable 32 bits / 4 octets * / ; / * Pour les disques FAT16, c'est le nombre de secteurs occup\u00e9s par le r\u00e9pertoire racine, et pour les disques FAT32, c'est le num\u00e9ro de cluster de d\u00e9part du r\u00e9pertoire racine (longueur totale 32 bits, octet de poids faible en premier) * / VAR_DISK_ROOT = $44 * ; / * Le nombre total de clusters du disque logique (la longueur totale est de 32 bits, octet de poids faible en premier) * / VAR_DSK_TOTAL_CLUS = $48 * ; / * Le num\u00e9ro de secteur absolu de d\u00e9part du disque logique LBA (longueur totale 32 bits, octet de poids faible en premier) * / VAR_DSK_START_LBA = $4C * ; / * LBA de d\u00e9part de la zone de donn\u00e9es du disque logique (la longueur totale est de 32 bits, octet de poids faible en premier) * / VAR_DSK_DAT_START = $50 * ; / * LBA correspondant aux donn\u00e9es du tampon de donn\u00e9es actuel du disque (longueur totale 32 bits, octet de poids faible en premier) * / VAR_LBA_BUFFER = $54 * ; / * L'adresse LBA de d\u00e9part du disque actuellement lu et \u00e9crit (la longueur totale est de 32 bits, octet de poids faible en premier) * / VAR_LBA_CURRENT = $58 * ; / * L'adresse LBA du secteur o\u00f9 se trouvent les informations du r\u00e9pertoire de fichiers en cours (longueur totale 32 bits, octet de poids faible en premier) * / VAR_FAT_DIR_LBA = $5C * ; / * Le num\u00e9ro de cluster de d\u00e9part du fichier ou du r\u00e9pertoire (dossier) actuel (longueur totale 32 bits, octet de poids faible en premier) * / VAR_START_CLUSTER = $60 * ; / * Le num\u00e9ro de cluster actuel du fichier actuel (la longueur totale est de 32 bits, octet de poids faible en premier) * / VAR_CURRENT_CLUST = $64 * ; / * La longueur du fichier actuel (la longueur totale est de 32 bits, octet de poids faible en premier) * / VAR_FILE_SIZE = $68 * ; / * Le pointeur de fichier actuel, le d\u00e9calage d'octet de la position actuelle de lecture et d'\u00e9criture (longueur totale 32 bits, octet de poids faible en premier) * / *VAR_CURRENT_OFFSET = $6C

    "}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":"

    This lib is used to manage ch376 chip for 6502 cpu

    "},{"location":"assembly/","title":"Assembly","text":""},{"location":"assembly/#assembly","title":"Assembly","text":""},{"location":"assembly/#ch376_check_exist","title":"ch376_check_exist","text":"

    Description

    If ch376 is present, it will return $AA

    Modify

    Returns

    Example

     jsr ch376_check_exist\ncmp #$AA\nbeq @exists\nrts ; Does not exist\n@exists:\n...\n
    "},{"location":"assembly/#ch376_dir_create","title":"ch376_dir_create","text":"

    Description

    create a folder

    Modify

    Returns

    Example

     jsr ch376_dir_create\n; check accumulator here ch376_wait_response had been launched by ch376_dir_create\n
    "},{"location":"assembly/#ch376_disk_capacity","title":"ch376_disk_capacity","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"assembly/#ch376_disk_mount","title":"ch376_disk_mount","text":"

    Description

    perform a disk mount

    Modify

    Returns

    Example

     jsr ch376_disk_mount\n; check accumulator here ch376_wait_response had been launched by ch376_disk_mount\n
    "},{"location":"assembly/#ch376_disk_query","title":"ch376_disk_query","text":"

    Impossible to use

    "},{"location":"assembly/#ch376_file_close","title":"ch376_file_close","text":"

    Description

    Close file

    Modify

    Returns

    Example

     jsr ch376_file_close\n; check accumulator here ch376_wait_response had been launched by ch376_file_close\n
    "},{"location":"assembly/#ch376_file_create","title":"ch376_file_create","text":"

    Description

    create file

    Modify

    Returns

    Example

     jsr ch376_file_create\n; check accumulator here ch376_wait_response had been launched by ch376_file_create\n
    "},{"location":"assembly/#ch376_file_erase","title":"ch376_file_erase","text":"

    Description

    Erase file

    Modify

    Returns

    Example

     jsr ch376_file_erase\n; Check accumulator here :\n; Ch376_wait_response had been launched\n; By ch376_file_erase\n
    "},{"location":"assembly/#ch376_file_open","title":"ch376_file_open","text":"

    Description

    open file

    Modify

    Returns

    Example

     jsr ch376_file_erase\n; check accumulator here ch376_wait_response had been launched by ch376_file_open\nrts\n
    "},{"location":"assembly/#ch376_get_descr","title":"ch376_get_descr","text":"

    Description

    Get usb descr device

    Modify

    Returns

    Example

     jsr ch376_get_descr\n; check accumulator here ch376_wait_response had been launched by ch376_get_descr\nrts\n
    "},{"location":"assembly/#ch376_get_file_size","title":"ch376_get_file_size","text":"

    Description

    Get file size

    Impossible to use

    "},{"location":"assembly/#ch376_ic_get_ver","title":"ch376_ic_get_ver","text":"

    Description

    Get ch376 firmware version

    Modify

    Returns

    Example

     jsr ch376_ic_get_ver\n; check accumulator for Version (integer value)\n
    "},{"location":"assembly/#ch376_issue_token_x","title":"ch376_issue_token_x","text":"

    Description

    Send Token for control transfert

    Input

    Modify

    Returns

    Example

     lda #$80\njsr ch376_issue_token_x\n; check accumulator for ch376 status\n
    "},{"location":"assembly/#ch376_lib_version","title":"ch376_lib_version","text":"

    Description

    Get lib version

    Modify

    Returns

    Example

     jsr ch376_lib_version\ncmp #CH376_LIB_VERSION_2024_2\nbeq @right_version\n; Wrong version\n...\nrts\n@right_version:\n...\nrts\n
    "},{"location":"assembly/#ch376_reset_all","title":"ch376_reset_all","text":"

    Description

    reset CH376

    Modify

    Example

     jsr ch376_reset_all\nrts\n
    "},{"location":"assembly/#ch376_seek_file","title":"ch376_seek_file","text":"

    Description

    Seek file. Performs a wait_response

    Input

    Modify

    Returns

    Example

     lda #$04\nsta RES\nlda #$01\nldy #$02\nldx #$03\njsr ch376_seek_file\n; check accumulator here ch376_wait_response had been launched by ch376_seek_file\n

    Not tested

    "},{"location":"assembly/#ch376_set_address","title":"ch376_set_address","text":"

    Description

    set usb address

    Modify

    Example

     lda #$02\njsr ch376_set_address\n

    endproc proc ch376_set_bytes_read ;;@brief Set bytes to read. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip ;;@inputA Low value ;;@inputY High value ;;@modifyX ;;@modifyA ;;@ca65 ;;@` lda #$02 ;;@` ldy #$10 ;;@` jsr ch376_set_bytes_read ;;@ ldx #CH376_BYTE_READ .byt $2C ; jump 2 bytes with the hack bit $xxxx rite_entry_point: ldx #CH376_BYTE_WRITE stx CH376_COMMAND sta CH376_DATA sty CH376_DATA IFPC02 pc02 stz CH376_DATA stz CH376_DATA p02 else lda #$00 sta CH376_DATA sta CH376_DATA endif jmp _ch376_wait_response endproc proc ch376_set_bytes_write ;;@brief Set bytes to write. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip ;;@inputA Low value ;;@inputY High value ;;@modifyX ;;@modifyA ;;@ca65 ;;@` lda #$02 ;;@` ldy #$10 ;;@` jsr ch376_set_bytes_write ;;@ jmp ch376_set_bytes_read::write_entry_point endproc

    "},{"location":"assembly/#ch376_set_config","title":"ch376_set_config","text":"

    Description

    set config for usb device

    Input

    Modify

    Example

     lda #$02\njsr ch376_set_config\n
    "},{"location":"assembly/#ch376_set_file_name","title":"ch376_set_file_name","text":"

    Description

    set file_name

    Input

    Modify

    Example

     lda #<myfile\nldy #>myfile\njsr ch376_set_file_name\nrts\nmyfile:\n.byte \"hello.txt\"\n
    "},{"location":"assembly/#ch376_set_usb_addr","title":"ch376_set_usb_addr","text":"

    Description

    set usb_address

    Input

    Modify

    Example

    ; Set usb addr\nlda #$02\njsr ch376_set_usb_addr\nrts\n
    "},{"location":"assembly/#ch376_set_usb_mode","title":"ch376_set_usb_mode","text":"

    Description

    Set usb mode

    Input

    Modify

    Example

     lda #CH376_USB_MODE_HOST_RESET\njsr ch376_set_usb_mode\nrts\n
    "},{"location":"assembly/#ch376_set_usb_speed","title":"ch376_set_usb_speed","text":"

    Description

    Set usb mode

    Input

    Modify

    Example

     lda #$02\njsr ch376_set_usb_speed\nrts\n
    "},{"location":"assembly/#ch376_wait_response","title":"ch376_wait_response","text":"

    Description

    Perform wait_response. It's not needed to call because some commands already perform ch376_wait_response

    Modify

    Returns

    Example

     jsr ch376_wait_response\nrts\n
    "},{"location":"assembly/#ch376_wr_usb_data","title":"ch376_wr_usb_data","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    Input

    Modify

    Example

     lda #<data\nldx #>data\njsr ch376_wr_usb_data\nrts\ndata:\n; length, set port feature, set feature, port_power,0, Id port, 0, 0, 0\n.byte 8,$23,3,8,0,1,0,0\n
    "},{"location":"c/","title":"C","text":""},{"location":"c/#c","title":"C","text":""},{"location":"c/#unsigned-char-ch376_check_existvoid","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"c/#unsigned-char-ch376_dir_create","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"c/#ch376_disk_capacity","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"c/#unsigned-char-ch376_disk_mountvoid","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"c/#void-ch376_disk_queryvoid","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"c/#unsigned-char-ch376_file_close","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"c/#unsigned-char-ch376_dir_create_1","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"c/#unsigned-char-ch376_file_erase","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"c/#unsigned-char-ch376_file_openvoid","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"c/#unsigned-char-ch376_get_descrunsigned-char-mode","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"c/#void-ch376_get_file_sizevoid","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"c/#unsigned-char-ch376_ic_get_versionvoid","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"c/#void-ch376_issue_token_xunsigned-char-token","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"c/#unsigned-char-ch376_lib_versionvoid","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"c/#void-ch376_reset_allvoid","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"c/#unsigned-int-ch376_seek_filelong-position","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"c/#void-ch376_set_addressunsigned-char-adress","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"c/#void-ch376_set_bytes_writeunsigned-int-nb","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"c/#void-ch376_set_bytes_readunsigned-int-nb","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"c/#void-ch376_set_configunsigned-char-config","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"c/#void-ch376_set_file_namechar-filename","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"c/#void-ch376_set_usb_addrunsigned-char-adress","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"c/#void-ch376_set_usb_modeunsigned-char-mode","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"c/#void-ch376_set_usb_speedunsigned-char-speed","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"c/#unsigned-char-ch376_wait_responsevoid","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"c/#void-ch376_wr_usb_datachar-data","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/assembly/","title":"Assembly","text":""},{"location":"2024.2/assembly/#assembly","title":"Assembly","text":""},{"location":"2024.2/assembly/#ch376_check_exist","title":"ch376_check_exist","text":"

    Description

    If ch376 is present, it will return $AA

    Modify

    Returns

    Example

     jsr ch376_check_exist\ncmp #$AA\nbeq @exists\nrts ; Does not exist\n@exists:\n...\n
    "},{"location":"2024.2/assembly/#ch376_dir_create","title":"ch376_dir_create","text":"

    Description

    create a folder

    Modify

    Returns

    Example

     jsr ch376_dir_create\n; check accumulator here ch376_wait_response had been launched by ch376_dir_create\n
    "},{"location":"2024.2/assembly/#ch376_disk_capacity","title":"ch376_disk_capacity","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/assembly/#ch376_disk_mount","title":"ch376_disk_mount","text":"

    Description

    perform a disk mount

    Modify

    Returns

    Example

     jsr ch376_disk_mount\n; check accumulator here ch376_wait_response had been launched by ch376_disk_mount\n
    "},{"location":"2024.2/assembly/#ch376_disk_query","title":"ch376_disk_query","text":"

    Impossible to use

    "},{"location":"2024.2/assembly/#ch376_file_close","title":"ch376_file_close","text":"

    Description

    Close file

    Modify

    Returns

    Example

     jsr ch376_file_close\n; check accumulator here ch376_wait_response had been launched by ch376_file_close\n
    "},{"location":"2024.2/assembly/#ch376_file_create","title":"ch376_file_create","text":"

    Description

    create file

    Modify

    Returns

    Example

     jsr ch376_file_create\n; check accumulator here ch376_wait_response had been launched by ch376_file_create\n
    "},{"location":"2024.2/assembly/#ch376_file_erase","title":"ch376_file_erase","text":"

    Description

    Erase file

    Modify

    Returns

    Example

     jsr ch376_file_erase\n; Check accumulator here :\n; Ch376_wait_response had been launched\n; By ch376_file_erase\n
    "},{"location":"2024.2/assembly/#ch376_file_open","title":"ch376_file_open","text":"

    Description

    open file

    Modify

    Returns

    Example

     jsr ch376_file_erase\n; check accumulator here ch376_wait_response had been launched by ch376_file_open\nrts\n
    "},{"location":"2024.2/assembly/#ch376_get_descr","title":"ch376_get_descr","text":"

    Description

    Get usb descr device

    Modify

    Returns

    Example

     jsr ch376_get_descr\n; check accumulator here ch376_wait_response had been launched by ch376_get_descr\nrts\n
    "},{"location":"2024.2/assembly/#ch376_get_file_size","title":"ch376_get_file_size","text":"

    Description

    Get file size

    Impossible to use

    "},{"location":"2024.2/assembly/#ch376_ic_get_ver","title":"ch376_ic_get_ver","text":"

    Description

    Get ch376 firmware version

    Modify

    Returns

    Example

     jsr ch376_ic_get_ver\n; check accumulator for Version (integer value)\n
    "},{"location":"2024.2/assembly/#ch376_issue_token_x","title":"ch376_issue_token_x","text":"

    Description

    Send Token for control transfert

    Input

    Modify

    Returns

    Example

     lda #$80\njsr ch376_issue_token_x\n; check accumulator for ch376 status\n
    "},{"location":"2024.2/assembly/#ch376_lib_version","title":"ch376_lib_version","text":"

    Description

    Get lib version

    Modify

    Returns

    Example

     jsr ch376_lib_version\ncmp #CH376_LIB_VERSION_2024_2\nbeq @right_version\n; Wrong version\n...\nrts\n@right_version:\n...\nrts\n
    "},{"location":"2024.2/assembly/#ch376_reset_all","title":"ch376_reset_all","text":"

    Description

    reset CH376

    Modify

    Example

     jsr ch376_reset_all\nrts\n
    "},{"location":"2024.2/assembly/#ch376_seek_file","title":"ch376_seek_file","text":"

    Description

    Seek file. Performs a wait_response

    Input

    Modify

    Returns

    Example

     lda #$04\nsta RES\nlda #$01\nldy #$02\nldx #$03\njsr ch376_seek_file\n; check accumulator here ch376_wait_response had been launched by ch376_seek_file\n

    Not tested

    "},{"location":"2024.2/assembly/#ch376_set_address","title":"ch376_set_address","text":"

    Description

    set usb address

    Modify

    Example

     lda #$02\njsr ch376_set_address\n

    endproc proc ch376_set_bytes_read ;;@brief Set bytes to read. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip ;;@inputA Low value ;;@inputY High value ;;@modifyX ;;@modifyA ;;@ca65 ;;@` lda #$02 ;;@` ldy #$10 ;;@` jsr ch376_set_bytes_read ;;@ ldx #CH376_BYTE_READ .byt $2C ; jump 2 bytes with the hack bit $xxxx rite_entry_point: ldx #CH376_BYTE_WRITE stx CH376_COMMAND sta CH376_DATA sty CH376_DATA IFPC02 pc02 stz CH376_DATA stz CH376_DATA p02 else lda #$00 sta CH376_DATA sta CH376_DATA endif jmp _ch376_wait_response endproc proc ch376_set_bytes_write ;;@brief Set bytes to write. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip ;;@inputA Low value ;;@inputY High value ;;@modifyX ;;@modifyA ;;@ca65 ;;@` lda #$02 ;;@` ldy #$10 ;;@` jsr ch376_set_bytes_write ;;@ jmp ch376_set_bytes_read::write_entry_point endproc

    "},{"location":"2024.2/assembly/#ch376_set_config","title":"ch376_set_config","text":"

    Description

    set config for usb device

    Input

    Modify

    Example

     lda #$02\njsr ch376_set_config\n
    "},{"location":"2024.2/assembly/#ch376_set_file_name","title":"ch376_set_file_name","text":"

    Description

    set file_name

    Input

    Modify

    Example

     lda #<myfile\nldy #>myfile\njsr ch376_set_file_name\nrts\nmyfile:\n.byte \"hello.txt\"\n
    "},{"location":"2024.2/assembly/#ch376_set_usb_addr","title":"ch376_set_usb_addr","text":"

    Description

    set usb_address

    Input

    Modify

    Example

    ; Set usb addr\nlda #$02\njsr ch376_set_usb_addr\nrts\n
    "},{"location":"2024.2/assembly/#ch376_set_usb_mode","title":"ch376_set_usb_mode","text":"

    Description

    Set usb mode

    Input

    Modify

    Example

     lda #CH376_USB_MODE_HOST_RESET\njsr ch376_set_usb_mode\nrts\n
    "},{"location":"2024.2/assembly/#ch376_set_usb_speed","title":"ch376_set_usb_speed","text":"

    Description

    Set usb mode

    Input

    Modify

    Example

     lda #$02\njsr ch376_set_usb_speed\nrts\n
    "},{"location":"2024.2/assembly/#ch376_wait_response","title":"ch376_wait_response","text":"

    Description

    Perform wait_response. It's not needed to call because some commands already perform ch376_wait_response

    Modify

    Returns

    Example

     jsr ch376_wait_response\nrts\n
    "},{"location":"2024.2/assembly/#ch376_wr_usb_data","title":"ch376_wr_usb_data","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    Input

    Modify

    Example

     lda #<data\nldx #>data\njsr ch376_wr_usb_data\nrts\ndata:\n; length, set port feature, set feature, port_power,0, Id port, 0, 0, 0\n.byte 8,$23,3,8,0,1,0,0\n
    "},{"location":"2024.2/c/","title":"C","text":""},{"location":"2024.2/c/#c","title":"C","text":""},{"location":"2024.2/c/#unsigned-char-ch376_check_existvoid","title":"unsigned char ch376_check_exist(void);","text":"

    Description

    If ch376 is present, it will return 0XAA

    Returns

    0XAA if it's OK

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create","title":"unsigned char ch376_dir_create();","text":"

    Description

    create a folder

    "},{"location":"2024.2/c/#ch376_disk_capacity","title":"ch376_disk_capacity();","text":"

    Description

    check disk capacity

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_disk_mountvoid","title":"unsigned char ch376_disk_mount(void);","text":"

    Description

    perform a disk mount

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_disk_queryvoid","title":"void ch376_disk_query(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_close","title":"unsigned char ch376_file_close();","text":"

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_dir_create_1","title":"unsigned char ch376_dir_create();","text":"

    Description

    create file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_erase","title":"unsigned char ch376_file_erase();","text":"

    Description

    erase file

    Returns

    ch376 status value

    "},{"location":"2024.2/c/#unsigned-char-ch376_file_openvoid","title":"unsigned char ch376_file_open(void);","text":"

    Description

    open file

    Returns

    'ch376 status' value

    "},{"location":"2024.2/c/#unsigned-char-ch376_get_descrunsigned-char-mode","title":"unsigned char ch376_get_descr(unsigned char mode);","text":"

    Description

    Get usb descr device

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_get_file_sizevoid","title":"void ch376_get_file_size(void);","text":"

    Impossible to use

    "},{"location":"2024.2/c/#unsigned-char-ch376_ic_get_versionvoid","title":"unsigned char ch376_ic_get_version(void);","text":"

    Description

    Get ch376 firmware version

    Returns

    ch376 firmware version

    "},{"location":"2024.2/c/#void-ch376_issue_token_xunsigned-char-token","title":"void ch376_issue_token_x(unsigned char token)","text":"

    Description

    Send Token for control transfert

    "},{"location":"2024.2/c/#unsigned-char-ch376_lib_versionvoid","title":"unsigned char ch376_lib_version(void);","text":"

    Description

    Get lib version

    Returns

    ch376 lib version

    "},{"location":"2024.2/c/#void-ch376_reset_allvoid","title":"void ch376_reset_all(void);","text":"

    Description

    reset CH376

    "},{"location":"2024.2/c/#unsigned-int-ch376_seek_filelong-position","title":"unsigned int ch376_seek_file(long position);","text":"

    Description

    Seek file

    Returns

    ch376 status values

    "},{"location":"2024.2/c/#void-ch376_set_addressunsigned-char-adress","title":"void ch376_set_address(unsigned char adress);","text":"

    Description

    set usb address

    "},{"location":"2024.2/c/#void-ch376_set_bytes_writeunsigned-int-nb","title":"void ch376_set_bytes_write(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_bytes_readunsigned-int-nb","title":"void ch376_set_bytes_read(unsigned int nb);","text":""},{"location":"2024.2/c/#void-ch376_set_configunsigned-char-config","title":"void ch376_set_config(unsigned char config);","text":"

    Description

    set config for usb device

    "},{"location":"2024.2/c/#void-ch376_set_file_namechar-filename","title":"void ch376_set_file_name(char *filename);","text":"

    Description

    set file_name

    "},{"location":"2024.2/c/#void-ch376_set_usb_addrunsigned-char-adress","title":"void ch376_set_usb_addr(unsigned char adress);","text":"

    Description

    set usb_address

    "},{"location":"2024.2/c/#void-ch376_set_usb_modeunsigned-char-mode","title":"void ch376_set_usb_mode(unsigned char mode);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#void-ch376_set_usb_speedunsigned-char-speed","title":"void ch376_set_usb_speed(unsigned char speed);","text":"

    Description

    Set usb mode

    Input

    "},{"location":"2024.2/c/#unsigned-char-ch376_wait_responsevoid","title":"unsigned char ch376_wait_response(void);","text":"

    Description

    Perform wait_response

    Returns

    \"ch376 status\" values

    "},{"location":"2024.2/c/#void-ch376_wr_usb_datachar-data","title":"void ch376_wr_usb_data(char *data);","text":"

    Description

    Send data to usb device. First byte must be the the length to send

    "},{"location":"2024.2/ch376.inc/","title":"ch376.inc","text":"

    CH376_LIB_VERSION_2023_4 = $00 CH376_LIB_VERSION_2024_1 = $01 CH376_LIB_VERSION_2024_2 = $02 * CH376_DETECTED = $AA * CH376_NONE = $00 CH376_GET_IC_VER = $01 CH376_SET_BAUDRATE = $02 CH376_GET_ENTER_SLEEP = $03 CH276_SET_USB_SPEED = $04 CH376_RESET_ALL = $05 CH376_CHECK_EXIST = $06 CH376_GET_REGISTER = $0A CH376_GET_DEV_RATE = $0A CH376_SET_REGISTER = $0B CH376_SET_SD0 = $0B CH376_WRITE_VAR8 = $0B CH376_GET_FILE_SIZE = $0C ; Get the current file length CH376_READ_VAR32 = $0C CH376_WRITE_VAR32 = $0D CH376_DELAY_100US = $0F CH376_SET_USB_ADDR = $13 CH376_SET_USB_MODE = $15 CH376_TEST_CONNECT = $16 CH376_ABORT_NAK = $17 CH376_SET_EP0_RX = $18 CH376_SET_EP0_TX = $19 CH376_SET_EP1_RX = $1A CH376_SET_EP1_TX = $1B CH376_SET_EP2_RX = $1C CH376_SET_EP2_TX = $1D CH376_GET_STATUS = $22 CH376_UNLOCK_USB = $23 ; From CH375 datasheet CH376_DIRTY_BUFFER = $25 CH376_RD_USB_DATA0 = $27 CH376_RD_USB_DATA_UNLOCK = $28 ; From CH375 datasheet CH376_WR_EP0 = $29 ; DATA3 CH376_WR_EP1 = $2A ; DATA5 CH376_WR_EP2 = $2B ; DATA7 CH376_WR_USB_DATA = $2C CH376_WR_REQ_DATA = $2D CH376_OFS_DATA = $2E CH376_SET_FILE_NAME = $2F CH376_DISK_CONNECT = $30 ; check the disk connection status CH376_DISK_MOUNT = $31 CH376_FILE_OPEN = $32 CH376_FILE_ENUM_GO = $33 CH376_CMD_FILE_CREATE = $34 CH376_FILE_ERASE = $35 CH376_FILE_CLOSE = $36 CH376_DIR_INFO_READ = $37 CH376_DIR_INFO_SAVE = $38 CH376_BYTE_LOCATE = $39 CH376_BYTE_READ = $3A CH376_BYTE_RD_GO = $3B CH376_BYTE_WRITE = $3C CH376_BYTE_WR_GO = $3D CH376_DISK_CAPACITY = $3E CH376_DISK_QUERY = $3F CH376_DIR_CREATE = $40 CH376_CLR_STALL = $41 CH376_SET_ADRESS = $45 CH376_CMD_GET_DESCR = $46 CH376_CMD_SET_CONFIG = $49 ; Set USB configuration CH376_SEC_READ = $4B CH376_SEC_WRITE = $4C CH376_AUTO_SETUP = $4D CH376_ISSUE_TKN_X = $4E ; Send synchronization token and execute transactions CH376_DISC_BOC = $50 CH376_DISK_INIT = $51 ; Init USB memory CH376_DISK_RESET = $52 CH376_DISK_SIZE = $53 ; Get The maximum capacity of the USB memory CH376_DISC_READ = $54 CH376_DISK_RD_GO = $55 CH376_DISK_WRITE = $56 CH376_DISK_WR_GO = $57 CH376_DISK_INQUIRY = $58 CH376_DISK_READY = $59 CH376_DISK_R_SENSE = $5A CH376_RD_DISK_SEC = $5B CH376_WR_DISK_SEC = $5C CH376_DISK_MAX_LUN = $5D * ; CODE FOR CH376_SET_USB_MODE * CH376_USB_MODE_DEVICE_INVALID = $00 CH376_USB_MODE_DEVICE_OUTER_FW = $01 CH376_USB_MODE_DEVICE_INNER_FW = $02 CH376_USB_MODE_CODE_SDCARD = $03 ; The code of 06H means switch to valid USB-HOST, produce SOF package automatically. CH376_USB_MODE_CODE_USB_HOST_SOF_PACKAGE_AUTOMATICALLY = $06 CH376_USB_MODE_HOST_RESET = $07 * CH376_ERR_OPEN_DIR = $41 CH376_ERR_MISS_FILE = $42 CH376_ERR_FOUND_NAME = $43 CH376_ERR_DISK_DISCON = $82 CH376_ERR_LARGE_SECTOR = $84 CH376_ERR_TYPE_ERROR = $92 CH376_ERR_BPB_ERROR = $A1 CH376_ERR_DISK_FULL = $B1 CH376_ERR_FDT_OVER = $B2 CH376_ERR_FILE_CLOSE = $B4 * * CH376_USB_INT_SUCCESS = $14 CH376_USB_INT_CONNECT = $15 CH376_USB_INT_DISCONNECT = $16 CH376_USB_INT_BUF_OVER = $17 CH376_USB_INT_USB_READY = $18 CH376_USB_INT_DISK_READ = $1D CH376_USB_INT_DISK_WRITE = $1E CH376_USB_INT_DISK_ERR = $1F * CH376_ST_RET_SUCCESS = $51 CH376_ST_RET_ABORT = $5F * * * ; / * Informations de base du syst\u00e8me actuel * / ; / * Le bit 6 est utilis\u00e9 pour indiquer la sous-classe du p\u00e9riph\u00e9rique de stockage USB SubClass-Code, le bit 6 est 0 pour indiquer que la sous-classe est 6 et le bit 6 est 1 pour indiquer que la sous-classe est diff\u00e9rente de 6 * / ; / * Le bit 5 est utilis\u00e9 pour indiquer l'\u00e9tat de la configuration USB en mode p\u00e9riph\u00e9rique USB et l'\u00e9tat de la connexion du p\u00e9riph\u00e9rique USB en mode h\u00f4te USB * / ; / * En mode p\u00e9riph\u00e9rique USB, si le bit 5 est 1, la configuration USB est termin\u00e9e et les bits 5 et 0 ne sont pas configur\u00e9s * / ; / * En mode h\u00f4te USB, si le bit 5 est 1, il y a un p\u00e9riph\u00e9rique USB dans le port USB, et si le bit 5 est 0, il n'y a pas de p\u00e9riph\u00e9rique USB dans le port USB * / ; / * Le bit 4 est utilis\u00e9 pour indiquer l'\u00e9tat de verrouillage du tampon en mode p\u00e9riph\u00e9rique USB. Le bit 4 est 1 signifie que le tampon USB est verrouill\u00e9 et le bit 6 est 1 signifie qu'il a \u00e9t\u00e9 lib\u00e9r\u00e9 * / ; / * Autres bits, r\u00e9serv\u00e9s, veuillez ne pas modifier * / VAR_SYS_BASE_INFO = $20 * ; / * Nombre de tentatives d'op\u00e9ration de transaction USB * / ; / * Si le bit 7 est 0, il ne r\u00e9essayera pas lorsque NAK est re\u00e7u, le bit 7 est 1 et le bit 6 est 0, et r\u00e9essayera \u00e0 l'infini lors de la r\u00e9ception de NAK (vous pouvez utiliser la commande CMD_ABORT_NAK pour abandonner la nouvelle tentative), le bit 7 est 1 et 6 est 1 R\u00e9essayez au plus 3 secondes lors de la r\u00e9ception de NAK * / ; / * Bit 5 ~ Bit 0 repr\u00e9sente le nombre de tentatives apr\u00e8s l'expiration du d\u00e9lai * / VAR_RETRY_TIMES = $25 * ; / * Indicateur de bit en mode fichier h\u00f4te * / ; / * Bit 1 et Bit 0, l'indicateur du syst\u00e8me de fichiers FAT du disque logique, 00-FAT12, 01-FAT16, 10-FAT32, 11-ill\u00e9gal * / ; / * Bit 2, indique si les donn\u00e9es de la table FAT dans le tampon courant ont \u00e9t\u00e9 modifi\u00e9es, 0-non modifi\u00e9, 1-modifi\u00e9 * / ; / * Bit 3, la longueur du fichier doit \u00eatre modifi\u00e9e, le fichier actuel est ajout\u00e9 avec les donn\u00e9es, 0-Aucune modification n'est pas ajout\u00e9e, 1-Ajout\u00e9 et doit \u00eatre modifi\u00e9 * / ; / * Autres bits, r\u00e9serv\u00e9s, veuillez ne pas modifier * / VAR_FILE_BIT_FLAG = $26 * ; / * \u00c9tat du disque et du fichier en mode fichier h\u00f4te * / ; VAR_SD_BIT_FLAG 0x30 / * Indicateur de bit de la carte SD en mode fichier h\u00f4te * / ; / * Bit 0, version de la carte SD, 0- prend uniquement en charge la premi\u00e8re version SD, 1- prend en charge la deuxi\u00e8me version SD * / ; / * Bit 1, reconnaissance automatique, carte 0-SD, carte 1-MMC * / ; / * Bit 2, identification automatique, carte SD de capacit\u00e9 standard 0, carte SD 1 grande capacit\u00e9 (HC-SD) * / ; / * Bit 4, d\u00e9lai d'expiration de la commande ACMD41 * / ; / * Bit 5, d\u00e9lai d'expiration de la commande CMD1 * / ; / * Bit 6, d\u00e9lai d'expiration de la commande CMD58 * / ; / * Autres bits, r\u00e9serv\u00e9s, veuillez ne pas modifier * / VAR_DISK_STATUS = $2B * ; / * L'indicateur de synchronisation du point de terminaison BULK-IN / BULK-OUT du p\u00e9riph\u00e9rique de stockage USB * / ; / * Bit 7, indicateur de synchronisation de point de terminaison en bloc * / ; / * Bit 6, indicateur de synchronisation de point de terminaison en bloc * / ; / * Bit 5 ~ Bit 0, doit \u00eatre 0 * / VAR_UDISK_TOGGLE = $31 * ; / * Le num\u00e9ro d'unit\u00e9 logique du p\u00e9riph\u00e9rique de stockage USB * / ; / * Bit 7 ~ Bit 4, le num\u00e9ro d'unit\u00e9 logique actuel du p\u00e9riph\u00e9rique de stockage USB, apr\u00e8s que CH376 initialise le p\u00e9riph\u00e9rique de stockage USB, la valeur par d\u00e9faut est d'acc\u00e9der \u00e0 0 # unit\u00e9 logique * / ; / * Bit 3 ~ Bit 0, le num\u00e9ro d'unit\u00e9 logique maximum du p\u00e9riph\u00e9rique de stockage USB, plus 1 est \u00e9gal au nombre d'unit\u00e9s logiques * / VAR_UDISK_LUN = $34 * ; / * Le nombre de secteurs par cluster du disque logique * / VAR_SEC_PER_CLUS = $38 ; / * Le num\u00e9ro d'index des informations de r\u00e9pertoire de fichiers en cours dans le secteur * / VAR_FILE_DIR_INDEX = $3B * ; / * Le d\u00e9calage de secteur du pointeur de fichier actuel dans le cluster, 0xFF pointe vers la fin du fichier, la fin du cluster * / VAR_CLUS_SEC_OFS = $3C * ;/ * Variable 32 bits / 4 octets * / ; / * Pour les disques FAT16, c'est le nombre de secteurs occup\u00e9s par le r\u00e9pertoire racine, et pour les disques FAT32, c'est le num\u00e9ro de cluster de d\u00e9part du r\u00e9pertoire racine (longueur totale 32 bits, octet de poids faible en premier) * / VAR_DISK_ROOT = $44 * ; / * Le nombre total de clusters du disque logique (la longueur totale est de 32 bits, octet de poids faible en premier) * / VAR_DSK_TOTAL_CLUS = $48 * ; / * Le num\u00e9ro de secteur absolu de d\u00e9part du disque logique LBA (longueur totale 32 bits, octet de poids faible en premier) * / VAR_DSK_START_LBA = $4C * ; / * LBA de d\u00e9part de la zone de donn\u00e9es du disque logique (la longueur totale est de 32 bits, octet de poids faible en premier) * / VAR_DSK_DAT_START = $50 * ; / * LBA correspondant aux donn\u00e9es du tampon de donn\u00e9es actuel du disque (longueur totale 32 bits, octet de poids faible en premier) * / VAR_LBA_BUFFER = $54 * ; / * L'adresse LBA de d\u00e9part du disque actuellement lu et \u00e9crit (la longueur totale est de 32 bits, octet de poids faible en premier) * / VAR_LBA_CURRENT = $58 * ; / * L'adresse LBA du secteur o\u00f9 se trouvent les informations du r\u00e9pertoire de fichiers en cours (longueur totale 32 bits, octet de poids faible en premier) * / VAR_FAT_DIR_LBA = $5C * ; / * Le num\u00e9ro de cluster de d\u00e9part du fichier ou du r\u00e9pertoire (dossier) actuel (longueur totale 32 bits, octet de poids faible en premier) * / VAR_START_CLUSTER = $60 * ; / * Le num\u00e9ro de cluster actuel du fichier actuel (la longueur totale est de 32 bits, octet de poids faible en premier) * / VAR_CURRENT_CLUST = $64 * ; / * La longueur du fichier actuel (la longueur totale est de 32 bits, octet de poids faible en premier) * / VAR_FILE_SIZE = $68 * ; / * Le pointeur de fichier actuel, le d\u00e9calage d'octet de la position actuelle de lecture et d'\u00e9criture (longueur totale 32 bits, octet de poids faible en premier) * / *VAR_CURRENT_OFFSET = $6C

    "}]} \ No newline at end of file diff --git a/docs/api/sitemap.xml.gz b/docs/api/sitemap.xml.gz index e3550f1b78c427ad935425a26eca566b4e0de3d3..acd93cb553d9f65e0e75838fc17d0c47000a16c3 100644 GIT binary patch delta 12 Tcmb=gXOr*d;4nEfk*yK{7t902 delta 12 Tcmb=gXOr*d;Fz{(B3mT@88!q5 diff --git a/docs/builddocs.sh b/docs/builddocs.sh index 4feb1f8..12f4f41 100644 --- a/docs/builddocs.sh +++ b/docs/builddocs.sh @@ -11,16 +11,16 @@ VERSION=`cat VERSION` echo "# Assembly" > docs/code/$VERSION/assembly.md echo "" >> docs/code/$VERSION/assembly.md -echo "# C" > docs/code/c.md -echo "" >> docs/code/c.md +echo "# C" > docs/code/$VERSION/c.md +echo "" >> docs/code/$VERSION/c.md echo $VERSION mkdir docs/code/$VERSION for I in `ls src/*.s`; do cat $I | python3 docs/ca65todoc.py >> docs/code/$VERSION/assembly.md cat $I | python3 docs/ca65todoc_c_proto.py >> docs/code/$VERSION/c.md -cat $I | python3 docs/ca65todoc.py >> docs/code/$VERSION/assembly.md -cat $I | python3 docs/ca65todoc_c_proto.py >> docs/code/$VERSION/c.md +cat $I | python3 docs/ca65todoc.py >> docs/code/assembly.md +cat $I | python3 docs/ca65todoc_c_proto.py >> docs/code/c.md done # header diff --git a/docs/code/2024.2/assembly.md b/docs/code/2024.2/assembly.md index 0b10b32..10611a2 100644 --- a/docs/code/2024.2/assembly.md +++ b/docs/code/2024.2/assembly.md @@ -29,62 +29,6 @@ If ch376 is present, it will return $AA -## ch376_check_exist - -***Description*** - -If ch376 is present, it will return $AA - - -***Modify*** - -* Accumulator - -***Returns*** - -* Accumulator : $AA if it's OK - - -***Example*** - -```ca65 - jsr ch376_check_exist - cmp #$AA - beq @exists - rts ; Does not exist -@exists: -... -``` - - - -## ch376_dir_create - -***Description*** - -create a folder - - -***Modify*** - -* Accumulator -* X Register From ch376_wait_response_call -* Y Register From ch376_wait_response_call - -***Returns*** - -* Accumulator : ch376 status values - - -***Example*** - -```ca65 - jsr ch376_dir_create - ; check accumulator here ch376_wait_response had been launched by ch376_dir_create -``` - - - ## ch376_dir_create ***Description*** @@ -121,42 +65,6 @@ check disk capacity !!! bug "Impossible to use" -## ch376_disk_capacity - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## ch376_disk_mount - -***Description*** - -perform a disk mount - - -***Modify*** - -* Accumulator -* X Register From ch376_wait_response_call -* Y Register From ch376_wait_response_call - -***Returns*** - -* Accumulator : ch376 status values - - -***Example*** - -```ca65 - jsr ch376_disk_mount - ; check accumulator here ch376_wait_response had been launched by ch376_disk_mount -``` - - - ## ch376_disk_mount ***Description*** @@ -184,11 +92,6 @@ perform a disk mount -## ch376_disk_query - -!!! bug "Impossible to use" - - ## ch376_disk_query !!! bug "Impossible to use" @@ -221,11 +124,11 @@ Close file -## ch376_file_close +## ch376_file_create ***Description*** -Close file +create file ***Modify*** @@ -236,23 +139,23 @@ Close file ***Returns*** -* Accumulator : 'ch376 status' value +* Accumulator : ch376 status value ***Example*** ```ca65 - jsr ch376_file_close - ; check accumulator here ch376_wait_response had been launched by ch376_file_close + jsr ch376_file_create + ; check accumulator here ch376_wait_response had been launched by ch376_file_create ``` -## ch376_file_create +## ch376_file_erase ***Description*** -create file +Erase file ***Modify*** @@ -269,17 +172,19 @@ create file ***Example*** ```ca65 - jsr ch376_file_create - ; check accumulator here ch376_wait_response had been launched by ch376_file_create + jsr ch376_file_erase + ; Check accumulator here : + ; Ch376_wait_response had been launched + ; By ch376_file_erase ``` -## ch376_file_create +## ch376_file_open ***Description*** -create file +open file ***Modify*** @@ -290,170 +195,182 @@ create file ***Returns*** -* Accumulator : ch376 status value +* Accumulator : 'ch376 status' value ***Example*** ```ca65 - jsr ch376_file_create - ; check accumulator here ch376_wait_response had been launched by ch376_file_create + jsr ch376_file_erase + ; check accumulator here ch376_wait_response had been launched by ch376_file_open + rts ``` -## ch376_file_erase +## ch376_get_descr ***Description*** -Erase file +Get usb descr device ***Modify*** -* Accumulator -* X Register From ch376_wait_response_call +* X Register * Y Register From ch376_wait_response_call ***Returns*** -* Accumulator : ch376 status value +* Accumulator : ch376 status values ***Example*** ```ca65 - jsr ch376_file_erase - ; Check accumulator here : - ; Ch376_wait_response had been launched - ; By ch376_file_erase + jsr ch376_get_descr + ; check accumulator here ch376_wait_response had been launched by ch376_get_descr + rts ``` -## ch376_file_erase +## ch376_get_file_size ***Description*** -Erase file +Get file size + +!!! bug "Impossible to use" + + +## ch376_ic_get_ver + +***Description*** + +Get ch376 firmware version ***Modify*** * Accumulator -* X Register From ch376_wait_response_call -* Y Register From ch376_wait_response_call ***Returns*** -* Accumulator : ch376 status value +* Accumulator : ch376 firmware version ***Example*** ```ca65 - jsr ch376_file_erase - ; Check accumulator here : - ; Ch376_wait_response had been launched - ; By ch376_file_erase + jsr ch376_ic_get_ver + ; check accumulator for Version (integer value) ``` -## ch376_file_open +## ch376_issue_token_x ***Description*** -open file +Send Token for control transfert + +***Input*** +* Accumulator : ch376 Token ***Modify*** * Accumulator -* X Register From ch376_wait_response_call -* Y Register From ch376_wait_response_call +* X Register +* Y Register From ch376_wait_response ***Returns*** -* Accumulator : 'ch376 status' value +* Accumulator : ch376 status ***Example*** ```ca65 - jsr ch376_file_erase - ; check accumulator here ch376_wait_response had been launched by ch376_file_open - rts + lda #$80 + jsr ch376_issue_token_x + ; check accumulator for ch376 status ``` -## ch376_file_open +## ch376_lib_version ***Description*** -open file +Get lib version ***Modify*** * Accumulator -* X Register From ch376_wait_response_call -* Y Register From ch376_wait_response_call ***Returns*** -* Accumulator : 'ch376 status' value +* Accumulator : ch376 lib version ***Example*** ```ca65 - jsr ch376_file_erase - ; check accumulator here ch376_wait_response had been launched by ch376_file_open + jsr ch376_lib_version + cmp #CH376_LIB_VERSION_2024_2 + beq @right_version + ; Wrong version +... + rts +@right_version: +... rts ``` -## ch376_get_descr +## ch376_reset_all ***Description*** -Get usb descr device +reset CH376 ***Modify*** +* Accumulator * X Register -* Y Register From ch376_wait_response_call - -***Returns*** - -* Accumulator : ch376 status values - +* Y Register ***Example*** ```ca65 - jsr ch376_get_descr - ; check accumulator here ch376_wait_response had been launched by ch376_get_descr + jsr ch376_reset_all rts ``` -## ch376_get_descr +## ch376_seek_file ***Description*** -Get usb descr device +Seek file. Performs a wait_response + +***Input*** +* Accumulator : First byte +* Y Register : second byte +* X Register : third byte byte ***Modify*** -* X Register -* Y Register From ch376_wait_response_call +* Accumulator +* X Register from ch376_wait_response call +* Y Register from ch376_wait_response call ***Returns*** @@ -463,359 +380,30 @@ Get usb descr device ***Example*** ```ca65 - jsr ch376_get_descr - ; check accumulator here ch376_wait_response had been launched by ch376_get_descr - rts + lda #$04 + sta RES + lda #$01 + ldy #$02 + ldx #$03 + jsr ch376_seek_file + ; check accumulator here ch376_wait_response had been launched by ch376_seek_file ``` +!!! note "Not tested" -## ch376_get_file_size +## ch376_set_address ***Description*** -Get file size - -!!! bug "Impossible to use" +set usb address -## ch376_get_file_size +***Modify*** -***Description*** +* X Register -Get file size - -!!! bug "Impossible to use" - - -## ch376_ic_get_ver - -***Description*** - -Get ch376 firmware version - - -***Modify*** - -* Accumulator - -***Returns*** - -* Accumulator : ch376 firmware version - - -***Example*** - -```ca65 - jsr ch376_ic_get_ver - ; check accumulator for Version (integer value) -``` - - - -## ch376_ic_get_ver - -***Description*** - -Get ch376 firmware version - - -***Modify*** - -* Accumulator - -***Returns*** - -* Accumulator : ch376 firmware version - - -***Example*** - -```ca65 - jsr ch376_ic_get_ver - ; check accumulator for Version (integer value) -``` - - - -## ch376_issue_token_x - -***Description*** - -Send Token for control transfert - -***Input*** - -* Accumulator : ch376 Token - -***Modify*** - -* Accumulator -* X Register -* Y Register From ch376_wait_response - -***Returns*** - -* Accumulator : ch376 status - - -***Example*** - -```ca65 - lda #$80 - jsr ch376_issue_token_x - ; check accumulator for ch376 status -``` - - - -## ch376_issue_token_x - -***Description*** - -Send Token for control transfert - -***Input*** - -* Accumulator : ch376 Token - -***Modify*** - -* Accumulator -* X Register -* Y Register From ch376_wait_response - -***Returns*** - -* Accumulator : ch376 status - - -***Example*** - -```ca65 - lda #$80 - jsr ch376_issue_token_x - ; check accumulator for ch376 status -``` - - - -## ch376_lib_version - -***Description*** - -Get lib version - - -***Modify*** - -* Accumulator - -***Returns*** - -* Accumulator : ch376 lib version - - -***Example*** - -```ca65 - jsr ch376_lib_version - cmp #CH376_LIB_VERSION_2024_2 - beq @right_version - ; Wrong version -... - rts -@right_version: -... - rts -``` - - - -## ch376_lib_version - -***Description*** - -Get lib version - - -***Modify*** - -* Accumulator - -***Returns*** - -* Accumulator : ch376 lib version - - -***Example*** - -```ca65 - jsr ch376_lib_version - cmp #CH376_LIB_VERSION_2024_2 - beq @right_version - ; Wrong version -... - rts -@right_version: -... - rts -``` - - - -## ch376_reset_all - -***Description*** - -reset CH376 - - -***Modify*** - -* Accumulator -* X Register -* Y Register - -***Example*** - -```ca65 - jsr ch376_reset_all - rts -``` - - - -## ch376_reset_all - -***Description*** - -reset CH376 - - -***Modify*** - -* Accumulator -* X Register -* Y Register - -***Example*** - -```ca65 - jsr ch376_reset_all - rts -``` - - - -## ch376_seek_file - -***Description*** - -Seek file. Performs a wait_response - -***Input*** - -* Accumulator : First byte -* Y Register : second byte -* X Register : third byte byte - -***Modify*** - -* Accumulator -* X Register from ch376_wait_response call -* Y Register from ch376_wait_response call - -***Returns*** - -* Accumulator : ch376 status values - - -***Example*** - -```ca65 - lda #$04 - sta RES - lda #$01 - ldy #$02 - ldx #$03 - jsr ch376_seek_file - ; check accumulator here ch376_wait_response had been launched by ch376_seek_file -``` - -!!! note "Not tested" - - -## ch376_seek_file - -***Description*** - -Seek file. Performs a wait_response - -***Input*** - -* Accumulator : First byte -* Y Register : second byte -* X Register : third byte byte - -***Modify*** - -* Accumulator -* X Register from ch376_wait_response call -* Y Register from ch376_wait_response call - -***Returns*** - -* Accumulator : ch376 status values - - -***Example*** - -```ca65 - lda #$04 - sta RES - lda #$01 - ldy #$02 - ldx #$03 - jsr ch376_seek_file - ; check accumulator here ch376_wait_response had been launched by ch376_seek_file -``` - -!!! note "Not tested" - - -## ch376_set_address - -***Description*** - -set usb address - - -***Modify*** - -* X Register - -***Example*** - -```ca65 - lda #$02 - jsr ch376_set_address -``` - - - -## ch376_set_address - -***Description*** - -set usb address - - -***Modify*** - -* X Register - -***Example*** +***Example*** ```ca65 lda #$02 @@ -868,73 +456,6 @@ proc ch376_set_bytes_write ;;@``` jmp ch376_set_bytes_read::write_entry_point endproc -endproc -proc ch376_set_bytes_read - ;;@brief Set bytes to read. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip - ;;@inputA Low value - ;;@inputY High value - ;;@modifyX - ;;@modifyA - ;;@```ca65 - ;;@` lda #$02 - ;;@` ldy #$10 - ;;@` jsr ch376_set_bytes_read - ;;@``` - ldx #CH376_BYTE_READ - .byt $2C ; jump 2 bytes with the hack bit $xxxx -rite_entry_point: - ldx #CH376_BYTE_WRITE - stx CH376_COMMAND - sta CH376_DATA - sty CH376_DATA -IFPC02 -pc02 - stz CH376_DATA - stz CH376_DATA -p02 -else - lda #$00 - sta CH376_DATA - sta CH376_DATA -endif - jmp _ch376_wait_response -endproc -proc ch376_set_bytes_write - ;;@brief Set bytes to write. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip - ;;@inputA Low value - ;;@inputY High value - ;;@modifyX - ;;@modifyA - ;;@```ca65 - ;;@` lda #$02 - ;;@` ldy #$10 - ;;@` jsr ch376_set_bytes_write - ;;@``` - jmp ch376_set_bytes_read::write_entry_point -endproc -## ch376_set_config - -***Description*** - -set config for usb device - -***Input*** - -* Accumulator : config value - -***Modify*** - -* X Register - -***Example*** - -```ca65 - lda #$02 - jsr ch376_set_config -``` - - - ## ch376_set_config ***Description*** @@ -988,61 +509,6 @@ myfile: -## ch376_set_file_name - -***Description*** - -set file_name - -***Input*** - -* Accumulator : Low ptr adress of the string, terminated by 0 -* Y Register : High ptr adress of the string, terminated by 0 - -***Modify*** - - -* Accumulator -* Y Register - -***Example*** - -```ca65 - lda #myfile - jsr ch376_set_file_name - rts -myfile: - .byte "hello.txt" -``` - - - -## ch376_set_usb_addr - -***Description*** - -set usb_address - -***Input*** - -* Accumulator : The address to set - -***Modify*** - -* X Register - -***Example*** - -```ca65 -; Set usb addr - lda #$02 - jsr ch376_set_usb_addr - rts -``` - - - ## ch376_set_usb_addr ***Description*** @@ -1092,54 +558,6 @@ Set usb mode -## ch376_set_usb_mode - -***Description*** - -Set usb mode - -***Input*** - -* Accumulator : The usb mode to set - -***Modify*** - -* X Register - -***Example*** - -```ca65 - lda #CH376_USB_MODE_HOST_RESET - jsr ch376_set_usb_mode - rts -``` - - - -## ch376_set_usb_speed - -***Description*** - -Set usb mode - -***Input*** - -* Accumulator : The speed for usb - -***Modify*** - -* X Register - -***Example*** - -```ca65 - lda #$02 - jsr ch376_set_usb_speed - rts -``` - - - ## ch376_set_usb_speed ***Description*** @@ -1191,64 +609,6 @@ Perform wait_response. It's not needed to call because some commands already per -## ch376_wait_response - -***Description*** - -Perform wait_response. It's not needed to call because some commands already perform ch376_wait_response - - -***Modify*** - -* Accumulator -* X Register -* Y Register - -***Returns*** - -* Accumulator : "ch376 status" value (or return 1 if usb controller does not respond) - - -***Example*** - -```ca65 - jsr ch376_wait_response - rts -``` - - - -## ch376_wr_usb_data - -***Description*** - -Send data to usb device. First byte must be the the length to send - -***Input*** - -* Accumulator : Low byte of ptr data -* X Register : High byte of ptr data - -***Modify*** - -* Accumulator -* Y Register -* X Register - -***Example*** - -```ca65 - lda #data - jsr ch376_wr_usb_data - rts -data: - ; length, set port feature, set feature, port_power,0, Id port, 0, 0, 0 - .byte 8,$23,3,8,0,1,0,0 -``` - - - ## ch376_wr_usb_data ***Description*** diff --git a/docs/code/2024.2/c.md b/docs/code/2024.2/c.md index a0981b0..0cbb61f 100644 --- a/docs/code/2024.2/c.md +++ b/docs/code/2024.2/c.md @@ -1,2995 +1,4 @@ -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - -## unsigned char ch376_check_exist(void); - -***Description*** - -If ch376 is present, it will return 0XAA - -***Returns*** - -0XAA if it's OK - +# C ## unsigned char ch376_check_exist(void); @@ -3010,23 +19,6 @@ create a folder -## unsigned char ch376_dir_create(); - -***Description*** - -create a folder - - - -## ch376_disk_capacity(); - -***Description*** - -check disk capacity - -!!! bug "Impossible to use" - - ## ch376_disk_capacity(); ***Description*** @@ -3047,22 +39,6 @@ perform a disk mount ch376 status values -## unsigned char ch376_disk_mount(void); - -***Description*** - -perform a disk mount - -***Returns*** - -ch376 status values - - -## void ch376_disk_query(void); - -!!! bug "Impossible to use" - - ## void ch376_disk_query(void); !!! bug "Impossible to use" @@ -3075,24 +51,6 @@ ch376 status values ch376 status values -## unsigned char ch376_file_close(); - -***Returns*** - -ch376 status values - - -## unsigned char ch376_dir_create(); - -***Description*** - -create file - -***Returns*** - -ch376 status values - - ## unsigned char ch376_dir_create(); ***Description*** @@ -3115,28 +73,6 @@ erase file ch376 status value -## unsigned char ch376_file_erase(); - -***Description*** - -erase file - -***Returns*** - -ch376 status value - - -## unsigned char ch376_file_open(void); - -***Description*** - -open file - -***Returns*** - -'ch376 status' value - - ## unsigned char ch376_file_open(void); ***Description*** @@ -3159,22 +95,6 @@ Get usb descr device ch376 status values -## unsigned char ch376_get_descr(unsigned char mode); - -***Description*** - -Get usb descr device - -***Returns*** - -ch376 status values - - -## void ch376_get_file_size(void); - -!!! bug "Impossible to use" - - ## void ch376_get_file_size(void); !!! bug "Impossible to use" @@ -3191,25 +111,6 @@ Get ch376 firmware version ch376 firmware version -## unsigned char ch376_ic_get_version(void); - -***Description*** - -Get ch376 firmware version - -***Returns*** - -ch376 firmware version - - -## void ch376_issue_token_x(unsigned char token) - -***Description*** - -Send Token for control transfert - - - ## void ch376_issue_token_x(unsigned char token) ***Description*** @@ -3229,25 +130,6 @@ Get lib version ch376 lib version -## unsigned char ch376_lib_version(void); - -***Description*** - -Get lib version - -***Returns*** - -ch376 lib version - - -## void ch376_reset_all(void); - -***Description*** - -reset CH376 - - - ## void ch376_reset_all(void); ***Description*** @@ -3267,25 +149,6 @@ Seek file ch376 status values -## unsigned int ch376_seek_file(long position); - -***Description*** - -Seek file - -***Returns*** - -ch376 status values - - -## void ch376_set_address(unsigned char adress); - -***Description*** - -set usb address - - - ## void ch376_set_address(unsigned char adress); ***Description*** @@ -3302,22 +165,6 @@ set usb address -## void ch376_set_bytes_write(unsigned int nb); - - - -## void ch376_set_bytes_read(unsigned int nb); - - - -## void ch376_set_config(unsigned char config); - -***Description*** - -set config for usb device - - - ## void ch376_set_config(unsigned char config); ***Description*** @@ -3334,22 +181,6 @@ set file_name -## void ch376_set_file_name(char *filename); - -***Description*** - -set file_name - - - -## void ch376_set_usb_addr(unsigned char adress); - -***Description*** - -set usb_address - - - ## void ch376_set_usb_addr(unsigned char adress); ***Description*** @@ -3369,28 +200,6 @@ Set usb mode -## void ch376_set_usb_mode(unsigned char mode); - -***Description*** - -Set usb mode - -***Input*** - - - - -## void ch376_set_usb_speed(unsigned char speed); - -***Description*** - -Set usb mode - -***Input*** - - - - ## void ch376_set_usb_speed(unsigned char speed); ***Description*** @@ -3413,25 +222,6 @@ Perform wait_response "ch376 status" values -## unsigned char ch376_wait_response(void); - -***Description*** - -Perform wait_response - -***Returns*** - -"ch376 status" values - - -## void ch376_wr_usb_data(char *data); - -***Description*** - -Send data to usb device. First byte must be the the length to send - - - ## void ch376_wr_usb_data(char *data); ***Description*** diff --git a/docs/code/assembly.md b/docs/code/assembly.md index 53ec78f..10611a2 100644 --- a/docs/code/assembly.md +++ b/docs/code/assembly.md @@ -1,2 +1,642 @@ # Assembly +## ch376_check_exist + +***Description*** + +If ch376 is present, it will return $AA + + +***Modify*** + +* Accumulator + +***Returns*** + +* Accumulator : $AA if it's OK + + +***Example*** + +```ca65 + jsr ch376_check_exist + cmp #$AA + beq @exists + rts ; Does not exist +@exists: +... +``` + + + +## ch376_dir_create + +***Description*** + +create a folder + + +***Modify*** + +* Accumulator +* X Register From ch376_wait_response_call +* Y Register From ch376_wait_response_call + +***Returns*** + +* Accumulator : ch376 status values + + +***Example*** + +```ca65 + jsr ch376_dir_create + ; check accumulator here ch376_wait_response had been launched by ch376_dir_create +``` + + + +## ch376_disk_capacity + +***Description*** + +check disk capacity + +!!! bug "Impossible to use" + + +## ch376_disk_mount + +***Description*** + +perform a disk mount + + +***Modify*** + +* Accumulator +* X Register From ch376_wait_response_call +* Y Register From ch376_wait_response_call + +***Returns*** + +* Accumulator : ch376 status values + + +***Example*** + +```ca65 + jsr ch376_disk_mount + ; check accumulator here ch376_wait_response had been launched by ch376_disk_mount +``` + + + +## ch376_disk_query + +!!! bug "Impossible to use" + + +## ch376_file_close + +***Description*** + +Close file + + +***Modify*** + +* Accumulator +* X Register From ch376_wait_response_call +* Y Register From ch376_wait_response_call + +***Returns*** + +* Accumulator : 'ch376 status' value + + +***Example*** + +```ca65 + jsr ch376_file_close + ; check accumulator here ch376_wait_response had been launched by ch376_file_close +``` + + + +## ch376_file_create + +***Description*** + +create file + + +***Modify*** + +* Accumulator +* X Register From ch376_wait_response_call +* Y Register From ch376_wait_response_call + +***Returns*** + +* Accumulator : ch376 status value + + +***Example*** + +```ca65 + jsr ch376_file_create + ; check accumulator here ch376_wait_response had been launched by ch376_file_create +``` + + + +## ch376_file_erase + +***Description*** + +Erase file + + +***Modify*** + +* Accumulator +* X Register From ch376_wait_response_call +* Y Register From ch376_wait_response_call + +***Returns*** + +* Accumulator : ch376 status value + + +***Example*** + +```ca65 + jsr ch376_file_erase + ; Check accumulator here : + ; Ch376_wait_response had been launched + ; By ch376_file_erase +``` + + + +## ch376_file_open + +***Description*** + +open file + + +***Modify*** + +* Accumulator +* X Register From ch376_wait_response_call +* Y Register From ch376_wait_response_call + +***Returns*** + +* Accumulator : 'ch376 status' value + + +***Example*** + +```ca65 + jsr ch376_file_erase + ; check accumulator here ch376_wait_response had been launched by ch376_file_open + rts +``` + + + +## ch376_get_descr + +***Description*** + +Get usb descr device + + +***Modify*** + +* X Register +* Y Register From ch376_wait_response_call + +***Returns*** + +* Accumulator : ch376 status values + + +***Example*** + +```ca65 + jsr ch376_get_descr + ; check accumulator here ch376_wait_response had been launched by ch376_get_descr + rts +``` + + + +## ch376_get_file_size + +***Description*** + +Get file size + +!!! bug "Impossible to use" + + +## ch376_ic_get_ver + +***Description*** + +Get ch376 firmware version + + +***Modify*** + +* Accumulator + +***Returns*** + +* Accumulator : ch376 firmware version + + +***Example*** + +```ca65 + jsr ch376_ic_get_ver + ; check accumulator for Version (integer value) +``` + + + +## ch376_issue_token_x + +***Description*** + +Send Token for control transfert + +***Input*** + +* Accumulator : ch376 Token + +***Modify*** + +* Accumulator +* X Register +* Y Register From ch376_wait_response + +***Returns*** + +* Accumulator : ch376 status + + +***Example*** + +```ca65 + lda #$80 + jsr ch376_issue_token_x + ; check accumulator for ch376 status +``` + + + +## ch376_lib_version + +***Description*** + +Get lib version + + +***Modify*** + +* Accumulator + +***Returns*** + +* Accumulator : ch376 lib version + + +***Example*** + +```ca65 + jsr ch376_lib_version + cmp #CH376_LIB_VERSION_2024_2 + beq @right_version + ; Wrong version +... + rts +@right_version: +... + rts +``` + + + +## ch376_reset_all + +***Description*** + +reset CH376 + + +***Modify*** + +* Accumulator +* X Register +* Y Register + +***Example*** + +```ca65 + jsr ch376_reset_all + rts +``` + + + +## ch376_seek_file + +***Description*** + +Seek file. Performs a wait_response + +***Input*** + +* Accumulator : First byte +* Y Register : second byte +* X Register : third byte byte + +***Modify*** + +* Accumulator +* X Register from ch376_wait_response call +* Y Register from ch376_wait_response call + +***Returns*** + +* Accumulator : ch376 status values + + +***Example*** + +```ca65 + lda #$04 + sta RES + lda #$01 + ldy #$02 + ldx #$03 + jsr ch376_seek_file + ; check accumulator here ch376_wait_response had been launched by ch376_seek_file +``` + +!!! note "Not tested" + + +## ch376_set_address + +***Description*** + +set usb address + + +***Modify*** + +* X Register + +***Example*** + +```ca65 + lda #$02 + jsr ch376_set_address +``` + + + +endproc +proc ch376_set_bytes_read + ;;@brief Set bytes to read. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip + ;;@inputA Low value + ;;@inputY High value + ;;@modifyX + ;;@modifyA + ;;@```ca65 + ;;@` lda #$02 + ;;@` ldy #$10 + ;;@` jsr ch376_set_bytes_read + ;;@``` + ldx #CH376_BYTE_READ + .byt $2C ; jump 2 bytes with the hack bit $xxxx +rite_entry_point: + ldx #CH376_BYTE_WRITE + stx CH376_COMMAND + sta CH376_DATA + sty CH376_DATA +IFPC02 +pc02 + stz CH376_DATA + stz CH376_DATA +p02 +else + lda #$00 + sta CH376_DATA + sta CH376_DATA +endif + jmp _ch376_wait_response +endproc +proc ch376_set_bytes_write + ;;@brief Set bytes to write. Manage only 16 bits. Others bytes are set to 0 to provide 32 bits integer to ch376 chip + ;;@inputA Low value + ;;@inputY High value + ;;@modifyX + ;;@modifyA + ;;@```ca65 + ;;@` lda #$02 + ;;@` ldy #$10 + ;;@` jsr ch376_set_bytes_write + ;;@``` + jmp ch376_set_bytes_read::write_entry_point +endproc +## ch376_set_config + +***Description*** + +set config for usb device + +***Input*** + +* Accumulator : config value + +***Modify*** + +* X Register + +***Example*** + +```ca65 + lda #$02 + jsr ch376_set_config +``` + + + +## ch376_set_file_name + +***Description*** + +set file_name + +***Input*** + +* Accumulator : Low ptr adress of the string, terminated by 0 +* Y Register : High ptr adress of the string, terminated by 0 + +***Modify*** + + +* Accumulator +* Y Register + +***Example*** + +```ca65 + lda #myfile + jsr ch376_set_file_name + rts +myfile: + .byte "hello.txt" +``` + + + +## ch376_set_usb_addr + +***Description*** + +set usb_address + +***Input*** + +* Accumulator : The address to set + +***Modify*** + +* X Register + +***Example*** + +```ca65 +; Set usb addr + lda #$02 + jsr ch376_set_usb_addr + rts +``` + + + +## ch376_set_usb_mode + +***Description*** + +Set usb mode + +***Input*** + +* Accumulator : The usb mode to set + +***Modify*** + +* X Register + +***Example*** + +```ca65 + lda #CH376_USB_MODE_HOST_RESET + jsr ch376_set_usb_mode + rts +``` + + + +## ch376_set_usb_speed + +***Description*** + +Set usb mode + +***Input*** + +* Accumulator : The speed for usb + +***Modify*** + +* X Register + +***Example*** + +```ca65 + lda #$02 + jsr ch376_set_usb_speed + rts +``` + + + +## ch376_wait_response + +***Description*** + +Perform wait_response. It's not needed to call because some commands already perform ch376_wait_response + + +***Modify*** + +* Accumulator +* X Register +* Y Register + +***Returns*** + +* Accumulator : "ch376 status" value (or return 1 if usb controller does not respond) + + +***Example*** + +```ca65 + jsr ch376_wait_response + rts +``` + + + +## ch376_wr_usb_data + +***Description*** + +Send data to usb device. First byte must be the the length to send + +***Input*** + +* Accumulator : Low byte of ptr data +* X Register : High byte of ptr data + +***Modify*** + +* Accumulator +* Y Register +* X Register + +***Example*** + +```ca65 + lda #data + jsr ch376_wr_usb_data + rts +data: + ; length, set port feature, set feature, port_power,0, Id port, 0, 0, 0 + .byte 8,$23,3,8,0,1,0,0 +``` + + + diff --git a/docs/code/c.md b/docs/code/c.md index 05661e5..0cbb61f 100644 --- a/docs/code/c.md +++ b/docs/code/c.md @@ -1,2 +1,232 @@ # C +## unsigned char ch376_check_exist(void); + +***Description*** + +If ch376 is present, it will return 0XAA + +***Returns*** + +0XAA if it's OK + + +## unsigned char ch376_dir_create(); + +***Description*** + +create a folder + + + +## ch376_disk_capacity(); + +***Description*** + +check disk capacity + +!!! bug "Impossible to use" + + +## unsigned char ch376_disk_mount(void); + +***Description*** + +perform a disk mount + +***Returns*** + +ch376 status values + + +## void ch376_disk_query(void); + +!!! bug "Impossible to use" + + +## unsigned char ch376_file_close(); + +***Returns*** + +ch376 status values + + +## unsigned char ch376_dir_create(); + +***Description*** + +create file + +***Returns*** + +ch376 status values + + +## unsigned char ch376_file_erase(); + +***Description*** + +erase file + +***Returns*** + +ch376 status value + + +## unsigned char ch376_file_open(void); + +***Description*** + +open file + +***Returns*** + +'ch376 status' value + + +## unsigned char ch376_get_descr(unsigned char mode); + +***Description*** + +Get usb descr device + +***Returns*** + +ch376 status values + + +## void ch376_get_file_size(void); + +!!! bug "Impossible to use" + + +## unsigned char ch376_ic_get_version(void); + +***Description*** + +Get ch376 firmware version + +***Returns*** + +ch376 firmware version + + +## void ch376_issue_token_x(unsigned char token) + +***Description*** + +Send Token for control transfert + + + +## unsigned char ch376_lib_version(void); + +***Description*** + +Get lib version + +***Returns*** + +ch376 lib version + + +## void ch376_reset_all(void); + +***Description*** + +reset CH376 + + + +## unsigned int ch376_seek_file(long position); + +***Description*** + +Seek file + +***Returns*** + +ch376 status values + + +## void ch376_set_address(unsigned char adress); + +***Description*** + +set usb address + + + +## void ch376_set_bytes_write(unsigned int nb); + + + +## void ch376_set_bytes_read(unsigned int nb); + + + +## void ch376_set_config(unsigned char config); + +***Description*** + +set config for usb device + + + +## void ch376_set_file_name(char *filename); + +***Description*** + +set file_name + + + +## void ch376_set_usb_addr(unsigned char adress); + +***Description*** + +set usb_address + + + +## void ch376_set_usb_mode(unsigned char mode); + +***Description*** + +Set usb mode + +***Input*** + + + + +## void ch376_set_usb_speed(unsigned char speed); + +***Description*** + +Set usb mode + +***Input*** + + + + +## unsigned char ch376_wait_response(void); + +***Description*** + +Perform wait_response + +***Returns*** + +"ch376 status" values + + +## void ch376_wr_usb_data(char *data); + +***Description*** + +Send data to usb device. First byte must be the the length to send + + +