diff --git a/docs/api/2024.1/assembly/index.html b/docs/api/2024.1/assembly/index.html index 7241b3c..166a19c 100644 --- a/docs/api/2024.1/assembly/index.html +++ b/docs/api/2024.1/assembly/index.html @@ -454,6 +454,13 @@ ch395_get_int_status_sn + + +
  • + + ch395_get_ip_inf + +
  • @@ -755,6 +762,13 @@ ch395_get_int_status_sn +
  • + +
  • + + ch395_get_ip_inf + +
  • @@ -946,7 +960,7 @@

    ch395_check_exist

    Checks if ch395 exists

    Example

     jsr ch395_get_glob_int_status
    - cmp #$AA
    + cmp #CH395_DETECTED
      beq ch395_connected
      rts
     ch395_connected:
    @@ -962,6 +976,10 @@ 

    ch395_check_exist

    ch395_clear_recv_buf_sn

    Description

    Clear receive buffer

    +

    Example

    +
     lda #$01 ; Socket ID
    + jsr ch395_clear_recv_buf_sn
    +

    Modify

    • Accumulator
    • @@ -970,9 +988,13 @@

      ch395_clear_recv_buf_sn

      ch395_close_socket_sn

      Description

      Close socket

      +

      Example

      +
       lda #$01 ; Socket ID
      + jsr ch395_close_socket_sn
      +

      Input

        -
      • Accumulator : The id of the socket
      • +
      • Accumulator : The id of the socket to close

      Modify

        @@ -992,11 +1014,23 @@

        ch395_dhcp_enable

        ch395_get_cmd_status

        Description

        Get cmd status

        +

        Example

        +
         jsr ch395_get_cmd_status
        + ; Check A for STATUS
        + rts
        +

        Modify

        • Accumulator

        ch395_get_dhcp_status

        +

        Description

        +

        Get dhcp status

        +

        Example

        +
         jsr ch395_get_dhcp_status
        + ; Check A for dhcp status
        + rts
        +

        Modify

        • Accumulator
        • @@ -1015,15 +1049,39 @@

          ch395_get_glob_int_status

          ch395_get_ic_ver

          Description

          Get ch395 firmware version

          +

          Example

          +
           jsr ch395_get_ic_ver
          + ; Check A for version
          + rts
          +

          Modify

          • Accumulator

          ch395_get_int_status_sn

          +

          Description

          +

          Check interrupt socket status

          +

          Example

          +
           lda #CH395_SOCKET1 ; Check socket 1
          + jsr ch395_get_int_status_sn
          + ; Check interrupt type
          + rts
          +
          +

          Modify

          +
            +
          • Accumulator
          • +
          • X Register
          • +
          +

          Returns

          +
            +
          • Accumulator : Status of selected socket
          • +
          +

          ch395_get_ip_inf

          Modify

          • Accumulator
          • X Register
          • +
          • Y Register

          ch395_get_mac_adress

          Modify

          @@ -1076,11 +1134,23 @@

          ch395_get_socket_status_sn

        • Accumulator

        ch395_init

        +

        Description

        +

        Initialize ch395

        Modify

        • Accumulator

        ch395_open_socket_sn

        +

        Description

        +

        Open socket from arg

        +

        Input

        +
          +
        • Accumulator : Socket id
        • +
        +

        Modify

        +
          +
        • Y Register
        • +

        ch395_read_recv_buf_sn

        ch395_reset_all

        Description

        @@ -1096,7 +1166,17 @@

        ch395_retran_period

         lda #$FF
          ldx #$FF
          jsr ch395_retran_period
        + rts
         
        +

        Input

        +
          +
        • Accumulator : Period
        • +
        • X Register : Period
        • +
        +

        Modify

        +
          +
        • Y Register
        • +

        ch395_set_des_port_sn

        ch395_set_fun_para

        Input

        @@ -1134,7 +1214,7 @@

        ch395_write_send_buf_sn

    Last update: - 2024-02-03 + 2024-02-04 diff --git a/docs/api/2024.1/c/index.html b/docs/api/2024.1/c/index.html index 9f79b47..9e79d4f 100644 --- a/docs/api/2024.1/c/index.html +++ b/docs/api/2024.1/c/index.html @@ -430,6 +430,13 @@ oid ch395_close_socket_sn(unsigned char ID_SOCKET) +
  • + +
  • + + unsigned char ch395_get_dhcp_status(); + +
  • @@ -437,6 +444,13 @@ unsigned int ch395_get_glob_int_status(); +
  • + +
  • + + unsigned char ch395_get_ic_ver(); + +
  • @@ -458,6 +472,13 @@ unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET); +
  • + +
  • + + void ch395_init(); + +
  • @@ -465,6 +486,13 @@ void ch395_open_socket_sn(unsigned char ID_SOCKET) +
  • + +
  • + + void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); + +
  • @@ -571,6 +599,13 @@ oid ch395_close_socket_sn(unsigned char ID_SOCKET) +
  • + +
  • + + unsigned char ch395_get_dhcp_status(); + +
  • @@ -578,6 +613,13 @@ unsigned int ch395_get_glob_int_status(); +
  • + +
  • + + unsigned char ch395_get_ic_ver(); + +
  • @@ -599,6 +641,13 @@ unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET); +
  • + +
  • + + void ch395_init(); + +
  • @@ -606,6 +655,13 @@ void ch395_open_socket_sn(unsigned char ID_SOCKET) +
  • + +
  • + + void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); + +
  • @@ -666,17 +722,27 @@

    void ch395_clear_re

    oid ch395_close_socket_sn(unsigned char ID_SOCKET)

    Description

    Close socket

    +

    unsigned char ch395_get_dhcp_status();

    +

    Description

    +

    Get dhcp status

    unsigned int ch395_get_glob_int_status();

    Description

    Get General interrupt Status

    +

    unsigned char ch395_get_ic_ver();

    Description

    Get ch395 firmware version

    unsigned char ch395_get_int_status_sn(unsigned char ID_SOCKET);

    +

    Description

    +

    Check interrupt socket status

    void ch395_get_recv_len_sn(unsigned char ID_SOCKET)

    Description

    Get the length received from socket

    unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET);

    +

    void ch395_init();

    +

    Description

    +

    Initialize ch395

    void ch395_open_socket_sn(unsigned char ID_SOCKET)

    +

    void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET);

    void ch395_reset_all()

    Description

    Reset ch395

    @@ -694,7 +760,7 @@

    Last update: - 2024-02-03 + 2024-02-04 diff --git a/docs/api/assembly/index.html b/docs/api/assembly/index.html index 9125efe..32e0c06 100644 --- a/docs/api/assembly/index.html +++ b/docs/api/assembly/index.html @@ -472,6 +472,13 @@ ch395_get_int_status_sn +
  • + +
  • + + ch395_get_ip_inf + +
  • @@ -663,7 +670,7 @@

    ch395_check_exist

    Checks if ch395 exists

    Example

     jsr ch395_get_glob_int_status
    - cmp #$AA
    + cmp #CH395_DETECTED
      beq ch395_connected
      rts
     ch395_connected:
    @@ -679,6 +686,10 @@ 

    ch395_check_exist

    ch395_clear_recv_buf_sn

    Description

    Clear receive buffer

    +

    Example

    +
     lda #$01 ; Socket ID
    + jsr ch395_clear_recv_buf_sn
    +

    Modify

    • Accumulator
    • @@ -687,9 +698,13 @@

      ch395_clear_recv_buf_sn

      ch395_close_socket_sn

      Description

      Close socket

      +

      Example

      +
       lda #$01 ; Socket ID
      + jsr ch395_close_socket_sn
      +

      Input

        -
      • Accumulator : The id of the socket
      • +
      • Accumulator : The id of the socket to close

      Modify

        @@ -709,11 +724,23 @@

        ch395_dhcp_enable

        ch395_get_cmd_status

        Description

        Get cmd status

        +

        Example

        +
         jsr ch395_get_cmd_status
        + ; Check A for STATUS
        + rts
        +

        Modify

        • Accumulator

        ch395_get_dhcp_status

        +

        Description

        +

        Get dhcp status

        +

        Example

        +
         jsr ch395_get_dhcp_status
        + ; Check A for dhcp status
        + rts
        +

        Modify

        • Accumulator
        • @@ -732,16 +759,40 @@

          ch395_get_glob_int_status

          ch395_get_ic_ver

          Description

          Get ch395 firmware version

          +

          Example

          +
           jsr ch395_get_ic_ver
          + ; Check A for version
          + rts
          +

          Modify

          • Accumulator

          ch395_get_int_status_sn

          +

          Description

          +

          Check interrupt socket status

          +

          Example

          +
           lda #CH395_SOCKET1 ; Check socket 1
          + jsr ch395_get_int_status_sn
          + ; Check interrupt type
          + rts
          +

          Modify

          • Accumulator
          • X Register
          +

          Returns

          +
            +
          • Accumulator : Status of selected socket
          • +
          +

          ch395_get_ip_inf

          +

          Modify

          +
            +
          • Accumulator
          • +
          • X Register
          • +
          • Y Register
          • +

          ch395_get_mac_adress

          Modify

            @@ -793,11 +844,23 @@

            ch395_get_socket_status_sn

          • Accumulator

          ch395_init

          +

          Description

          +

          Initialize ch395

          Modify

          • Accumulator

          ch395_open_socket_sn

          +

          Description

          +

          Open socket from arg

          +

          Input

          +
            +
          • Accumulator : Socket id
          • +
          +

          Modify

          +
            +
          • Y Register
          • +

          ch395_read_recv_buf_sn

          ch395_reset_all

          Description

          @@ -813,7 +876,17 @@

          ch395_retran_period

           lda #$FF
            ldx #$FF
            jsr ch395_retran_period
          + rts
           
          +

          Input

          +
            +
          • Accumulator : Period
          • +
          • X Register : Period
          • +
          +

          Modify

          +
            +
          • Y Register
          • +

          ch395_set_des_port_sn

          ch395_set_fun_para

          Input

          @@ -851,7 +924,7 @@

          ch395_write_send_buf_sn

    Last update: - 2024-02-03 + 2024-02-04 diff --git a/docs/api/c/index.html b/docs/api/c/index.html index 91b184f..bb09d44 100644 --- a/docs/api/c/index.html +++ b/docs/api/c/index.html @@ -430,6 +430,13 @@ oid ch395_close_socket_sn(unsigned char ID_SOCKET) +
  • + +
  • + + unsigned char ch395_get_dhcp_status(); + +
  • @@ -437,6 +444,13 @@ unsigned int ch395_get_glob_int_status(); +
  • + +
  • + + unsigned char ch395_get_ic_ver(); + +
  • @@ -458,6 +472,13 @@ unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET); +
  • + +
  • + + void ch395_init(); + +
  • @@ -465,6 +486,13 @@ void ch395_open_socket_sn(unsigned char ID_SOCKET) +
  • + +
  • + + void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); + +
  • @@ -525,17 +553,27 @@

    void ch395_clear_re

    oid ch395_close_socket_sn(unsigned char ID_SOCKET)

    Description

    Close socket

    +

    unsigned char ch395_get_dhcp_status();

    +

    Description

    +

    Get dhcp status

    unsigned int ch395_get_glob_int_status();

    Description

    Get General interrupt Status

    +

    unsigned char ch395_get_ic_ver();

    Description

    Get ch395 firmware version

    unsigned char ch395_get_int_status_sn(unsigned char ID_SOCKET);

    +

    Description

    +

    Check interrupt socket status

    void ch395_get_recv_len_sn(unsigned char ID_SOCKET)

    Description

    Get the length received from socket

    unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET);

    +

    void ch395_init();

    +

    Description

    +

    Initialize ch395

    void ch395_open_socket_sn(unsigned char ID_SOCKET)

    +

    void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET);

    void ch395_reset_all()

    Description

    Reset ch395

    @@ -553,7 +591,7 @@

    Last update: - 2024-02-03 + 2024-02-04 diff --git a/docs/api/search/search_index.json b/docs/api/search/search_index.json index 55d5e98..a91aedd 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 ch395 chip for 6502 cpu

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

    Description

    Checks if ch395 exists

    Example

     jsr ch395_get_glob_int_status\ncmp #$AA\nbeq ch395_connected\nrts\nch395_connected:\n

    Modify

    • Accumulator

    Returns

    • Accumulator : Returns #AA if it exists
    "},{"location":"assembly/#ch395_clear_recv_buf_sn","title":"ch395_clear_recv_buf_sn","text":"

    Description

    Clear receive buffer

    Modify

    • Accumulator
    • Y Register
    "},{"location":"assembly/#ch395_close_socket_sn","title":"ch395_close_socket_sn","text":"

    Description

    Close socket

    Input

    • Accumulator : The id of the socket

    Modify

    • Y Register
    "},{"location":"assembly/#ch395_dhcp_enable","title":"ch395_dhcp_enable","text":"

    Description

    Enable or not dhcp

    Input

    • Accumulator : The mode to activate DHCP mode

    Modify

    • X Register
    "},{"location":"assembly/#ch395_get_cmd_status","title":"ch395_get_cmd_status","text":"

    Description

    Get cmd status

    Modify

    • Accumulator
    "},{"location":"assembly/#ch395_get_dhcp_status","title":"ch395_get_dhcp_status","text":"

    Modify

    • Accumulator
    "},{"location":"assembly/#ch395_get_glob_int_status","title":"ch395_get_glob_int_status","text":"

    Description

    Get General interrupt Status

    Modify

    • Accumulator

    Example

     jsr ch395_get_glob_int_status\n; check accumulator to get interrupts states\n
    "},{"location":"assembly/#ch395_get_ic_ver","title":"ch395_get_ic_ver","text":"

    Description

    Get ch395 firmware version

    Modify

    • Accumulator
    "},{"location":"assembly/#ch395_get_int_status_sn","title":"ch395_get_int_status_sn","text":"

    Modify

    • Accumulator
    • X Register
    "},{"location":"assembly/#ch395_get_mac_adress","title":"ch395_get_mac_adress","text":"

    Modify

    • Accumulator
    • X Register
    • Y Register
    "},{"location":"assembly/#ch395_get_phy_status","title":"ch395_get_phy_status","text":"

    Modify

    • Accumulator
    "},{"location":"assembly/#ch395_get_recv_len_sn","title":"ch395_get_recv_len_sn","text":"

    Description

    Get the length received from socket

    Example

     lda #$01 ; Socket 1\njsr ch395_get_recv_len_sn\n; check A and X for length received\nch395_connected:\n

    Modify

    • Accumulator
    • X Register

    Returns

    • Accumulator : The length

    • X Register : The length

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

    Modify

    • Accumulator
    • X Register
    • Y Register
    "},{"location":"assembly/#ch395_get_socket_status_sn","title":"ch395_get_socket_status_sn","text":"

    Description

    Returns in A socket status (close/open)

    Modify

    • X Register
    • Accumulator
    "},{"location":"assembly/#ch395_init","title":"ch395_init","text":"

    Modify

    • Accumulator
    "},{"location":"assembly/#ch395_open_socket_sn","title":"ch395_open_socket_sn","text":""},{"location":"assembly/#ch395_read_recv_buf_sn","title":"ch395_read_recv_buf_sn","text":""},{"location":"assembly/#ch395_reset_all","title":"ch395_reset_all","text":"

    Description

    Reset ch395

    Example

     jsr ch395_reset_all\n; Wait a bit\n
    "},{"location":"assembly/#ch395_retran_period","title":"ch395_retran_period","text":"

    Description

    Retran period

    Example

     lda #$FF\nldx #$FF\njsr ch395_retran_period\n
    "},{"location":"assembly/#ch395_set_des_port_sn","title":"ch395_set_des_port_sn","text":""},{"location":"assembly/#ch395_set_fun_para","title":"ch395_set_fun_para","text":"

    Input

    • Accumulator : Value

    Modify

    • Y Register
    • Accumulator
    "},{"location":"assembly/#ch395_set_gwip_addr","title":"ch395_set_gwip_addr","text":""},{"location":"assembly/#ch395_set_ip_addr","title":"ch395_set_ip_addr","text":"

    Description

    Set ip addr

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

    Description

    Set Socket Ip address to connect with

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

    Description

    Set ipraw protocol on socket

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

    Description

    Set mac address

    "},{"location":"assembly/#ch395_set_proto_type_sn","title":"ch395_set_proto_type_sn","text":""},{"location":"assembly/#ch395_set_retran_count","title":"ch395_set_retran_count","text":""},{"location":"assembly/#ch395_set_sour_port_sn","title":"ch395_set_sour_port_sn","text":""},{"location":"assembly/#ch395_tcp_connect_sn","title":"ch395_tcp_connect_sn","text":""},{"location":"assembly/#ch395_tcp_disconnect_sn","title":"ch395_tcp_disconnect_sn","text":""},{"location":"assembly/#ch395_tcp_listen_sn","title":"ch395_tcp_listen_sn","text":""},{"location":"assembly/#ch395_write_send_buf_sn","title":"ch395_write_send_buf_sn","text":""},{"location":"c/","title":"C","text":""},{"location":"c/#c","title":"C","text":""},{"location":"c/#unsigned-char-ch395_check_exist","title":"unsigned char ch395_check_exist();","text":""},{"location":"c/#void-ch395_clear_recv_buf_snunsigned-char-id_socket","title":"void ch395_clear_recv_buf_sn(unsigned char ID_SOCKET)","text":"

    Description

    Clear receive buffer

    "},{"location":"c/#oid-ch395_close_socket_snunsigned-char-id_socket","title":"oid ch395_close_socket_sn(unsigned char ID_SOCKET)","text":"

    Description

    Close socket

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

    Description

    Get General interrupt Status

    Description

    Get ch395 firmware version

    "},{"location":"c/#unsigned-char-ch395_get_int_status_snunsigned-char-id_socket","title":"unsigned char ch395_get_int_status_sn(unsigned char ID_SOCKET);","text":""},{"location":"c/#void-ch395_get_recv_len_snunsigned-char-id_socket","title":"void ch395_get_recv_len_sn(unsigned char ID_SOCKET)","text":"

    Description

    Get the length received from socket

    "},{"location":"c/#unsigned-int-ch395_get_socket_status_snunsigned-char-id_socket","title":"unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET);","text":""},{"location":"c/#void-ch395_open_socket_snunsigned-char-id_socket","title":"void ch395_open_socket_sn(unsigned char ID_SOCKET)","text":""},{"location":"c/#void-ch395_reset_all","title":"void ch395_reset_all()","text":"

    Description

    Reset ch395

    "},{"location":"c/#void-ch395_set_fun_paraunsigned-char-flag","title":"void ch395_set_fun_para(unsigned char flag)","text":"

    Description

    Set ip addr

    "},{"location":"c/#void-ch395_set_ip_addr_snunsigned-char-ip_addr-unsigned-char-id_socket","title":"void ch395_set_ip_addr_sn(unsigned char ip_addr[], unsigned char ID_SOCKET)","text":"

    Description

    Set ipraw protocol on socket

    "},{"location":"c/#void-ch395_set_proto_type_snunsigned-char-protounsigned-char-id_socket","title":"void ch395_set_proto_type_sn(unsigned char proto,unsigned char ID_SOCKET)","text":""},{"location":"c/#_1","title":"C","text":""},{"location":"2024.1/assembly/","title":"Assembly","text":""},{"location":"2024.1/assembly/#assembly","title":"Assembly","text":""},{"location":"2024.1/assembly/#ch395_check_exist","title":"ch395_check_exist","text":"

    Description

    Checks if ch395 exists

    Example

     jsr ch395_get_glob_int_status\ncmp #$AA\nbeq ch395_connected\nrts\nch395_connected:\n

    Modify

    • Accumulator

    Returns

    • Accumulator : Returns #AA if it exists
    "},{"location":"2024.1/assembly/#ch395_clear_recv_buf_sn","title":"ch395_clear_recv_buf_sn","text":"

    Description

    Clear receive buffer

    Modify

    • Accumulator
    • Y Register
    "},{"location":"2024.1/assembly/#ch395_close_socket_sn","title":"ch395_close_socket_sn","text":"

    Description

    Close socket

    Input

    • Accumulator : The id of the socket

    Modify

    • Y Register
    "},{"location":"2024.1/assembly/#ch395_dhcp_enable","title":"ch395_dhcp_enable","text":"

    Description

    Enable or not dhcp

    Input

    • Accumulator : The mode to activate DHCP mode

    Modify

    • X Register
    "},{"location":"2024.1/assembly/#ch395_get_cmd_status","title":"ch395_get_cmd_status","text":"

    Description

    Get cmd status

    Modify

    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_get_dhcp_status","title":"ch395_get_dhcp_status","text":"

    Modify

    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_get_glob_int_status","title":"ch395_get_glob_int_status","text":"

    Description

    Get General interrupt Status

    Modify

    • Accumulator

    Example

     jsr ch395_get_glob_int_status\n; check accumulator to get interrupts states\n
    "},{"location":"2024.1/assembly/#ch395_get_ic_ver","title":"ch395_get_ic_ver","text":"

    Description

    Get ch395 firmware version

    Modify

    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_get_int_status_sn","title":"ch395_get_int_status_sn","text":"

    Modify

    • Accumulator
    • X Register
    "},{"location":"2024.1/assembly/#ch395_get_mac_adress","title":"ch395_get_mac_adress","text":"

    Modify

    • Accumulator
    • X Register
    • Y Register
    "},{"location":"2024.1/assembly/#ch395_get_phy_status","title":"ch395_get_phy_status","text":"

    Modify

    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_get_recv_len_sn","title":"ch395_get_recv_len_sn","text":"

    Description

    Get the length received from socket

    Example

     lda #$01 ; Socket 1\njsr ch395_get_recv_len_sn\n; check A and X for length received\nch395_connected:\n

    Modify

    • Accumulator
    • X Register

    Returns

    • Accumulator : The length

    • X Register : The length

    "},{"location":"2024.1/assembly/#ch395_get_remot_ipp_sn","title":"ch395_get_remot_ipp_sn","text":"

    Modify

    • Accumulator
    • X Register
    • Y Register
    "},{"location":"2024.1/assembly/#ch395_get_socket_status_sn","title":"ch395_get_socket_status_sn","text":"

    Description

    Returns in A socket status (close/open)

    Modify

    • X Register
    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_init","title":"ch395_init","text":"

    Modify

    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_open_socket_sn","title":"ch395_open_socket_sn","text":""},{"location":"2024.1/assembly/#ch395_read_recv_buf_sn","title":"ch395_read_recv_buf_sn","text":""},{"location":"2024.1/assembly/#ch395_reset_all","title":"ch395_reset_all","text":"

    Description

    Reset ch395

    Example

     jsr ch395_reset_all\n; Wait a bit\n
    "},{"location":"2024.1/assembly/#ch395_retran_period","title":"ch395_retran_period","text":"

    Description

    Retran period

    Example

     lda #$FF\nldx #$FF\njsr ch395_retran_period\n
    "},{"location":"2024.1/assembly/#ch395_set_des_port_sn","title":"ch395_set_des_port_sn","text":""},{"location":"2024.1/assembly/#ch395_set_fun_para","title":"ch395_set_fun_para","text":"

    Input

    • Accumulator : Value

    Modify

    • Y Register
    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_set_gwip_addr","title":"ch395_set_gwip_addr","text":""},{"location":"2024.1/assembly/#ch395_set_ip_addr","title":"ch395_set_ip_addr","text":"

    Description

    Set ip addr

    "},{"location":"2024.1/assembly/#ch395_set_ip_addr_sn","title":"ch395_set_ip_addr_sn","text":"

    Description

    Set Socket Ip address to connect with

    "},{"location":"2024.1/assembly/#ch395_set_ipraw_pro_sn","title":"ch395_set_ipraw_pro_sn","text":"

    Description

    Set ipraw protocol on socket

    "},{"location":"2024.1/assembly/#ch395_set_mac_adress","title":"ch395_set_mac_adress","text":"

    Description

    Set mac address

    "},{"location":"2024.1/assembly/#ch395_set_proto_type_sn","title":"ch395_set_proto_type_sn","text":""},{"location":"2024.1/assembly/#ch395_set_retran_count","title":"ch395_set_retran_count","text":""},{"location":"2024.1/assembly/#ch395_set_sour_port_sn","title":"ch395_set_sour_port_sn","text":""},{"location":"2024.1/assembly/#ch395_tcp_connect_sn","title":"ch395_tcp_connect_sn","text":""},{"location":"2024.1/assembly/#ch395_tcp_disconnect_sn","title":"ch395_tcp_disconnect_sn","text":""},{"location":"2024.1/assembly/#ch395_tcp_listen_sn","title":"ch395_tcp_listen_sn","text":""},{"location":"2024.1/assembly/#ch395_write_send_buf_sn","title":"ch395_write_send_buf_sn","text":""},{"location":"2024.1/c/","title":"C","text":""},{"location":"2024.1/c/#c","title":"C","text":""},{"location":"2024.1/c/#unsigned-char-ch395_check_exist","title":"unsigned char ch395_check_exist();","text":""},{"location":"2024.1/c/#void-ch395_clear_recv_buf_snunsigned-char-id_socket","title":"void ch395_clear_recv_buf_sn(unsigned char ID_SOCKET)","text":"

    Description

    Clear receive buffer

    "},{"location":"2024.1/c/#oid-ch395_close_socket_snunsigned-char-id_socket","title":"oid ch395_close_socket_sn(unsigned char ID_SOCKET)","text":"

    Description

    Close socket

    "},{"location":"2024.1/c/#unsigned-int-ch395_get_glob_int_status","title":"unsigned int ch395_get_glob_int_status();","text":"

    Description

    Get General interrupt Status

    Description

    Get ch395 firmware version

    "},{"location":"2024.1/c/#unsigned-char-ch395_get_int_status_snunsigned-char-id_socket","title":"unsigned char ch395_get_int_status_sn(unsigned char ID_SOCKET);","text":""},{"location":"2024.1/c/#void-ch395_get_recv_len_snunsigned-char-id_socket","title":"void ch395_get_recv_len_sn(unsigned char ID_SOCKET)","text":"

    Description

    Get the length received from socket

    "},{"location":"2024.1/c/#unsigned-int-ch395_get_socket_status_snunsigned-char-id_socket","title":"unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET);","text":""},{"location":"2024.1/c/#void-ch395_open_socket_snunsigned-char-id_socket","title":"void ch395_open_socket_sn(unsigned char ID_SOCKET)","text":""},{"location":"2024.1/c/#void-ch395_reset_all","title":"void ch395_reset_all()","text":"

    Description

    Reset ch395

    "},{"location":"2024.1/c/#void-ch395_set_fun_paraunsigned-char-flag","title":"void ch395_set_fun_para(unsigned char flag)","text":"

    Description

    Set ip addr

    "},{"location":"2024.1/c/#void-ch395_set_ip_addr_snunsigned-char-ip_addr-unsigned-char-id_socket","title":"void ch395_set_ip_addr_sn(unsigned char ip_addr[], unsigned char ID_SOCKET)","text":"

    Description

    Set ipraw protocol on socket

    "},{"location":"2024.1/c/#void-ch395_set_proto_type_snunsigned-char-protounsigned-char-id_socket","title":"void ch395_set_proto_type_sn(unsigned char proto,unsigned char ID_SOCKET)","text":""},{"location":"2024.1/c/#_1","title":"C","text":""}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Introduction","text":"

    This lib is used to manage ch395 chip for 6502 cpu

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

    Description

    Checks if ch395 exists

    Example

     jsr ch395_get_glob_int_status\ncmp #CH395_DETECTED\nbeq ch395_connected\nrts\nch395_connected:\n

    Modify

    • Accumulator

    Returns

    • Accumulator : Returns #AA if it exists
    "},{"location":"assembly/#ch395_clear_recv_buf_sn","title":"ch395_clear_recv_buf_sn","text":"

    Description

    Clear receive buffer

    Example

     lda #$01 ; Socket ID\njsr ch395_clear_recv_buf_sn\n

    Modify

    • Accumulator
    • Y Register
    "},{"location":"assembly/#ch395_close_socket_sn","title":"ch395_close_socket_sn","text":"

    Description

    Close socket

    Example

     lda #$01 ; Socket ID\njsr ch395_close_socket_sn\n

    Input

    • Accumulator : The id of the socket to close

    Modify

    • Y Register
    "},{"location":"assembly/#ch395_dhcp_enable","title":"ch395_dhcp_enable","text":"

    Description

    Enable or not dhcp

    Input

    • Accumulator : The mode to activate DHCP mode

    Modify

    • X Register
    "},{"location":"assembly/#ch395_get_cmd_status","title":"ch395_get_cmd_status","text":"

    Description

    Get cmd status

    Example

     jsr ch395_get_cmd_status\n; Check A for STATUS\nrts\n

    Modify

    • Accumulator
    "},{"location":"assembly/#ch395_get_dhcp_status","title":"ch395_get_dhcp_status","text":"

    Description

    Get dhcp status

    Example

     jsr ch395_get_dhcp_status\n; Check A for dhcp status\nrts\n

    Modify

    • Accumulator
    "},{"location":"assembly/#ch395_get_glob_int_status","title":"ch395_get_glob_int_status","text":"

    Description

    Get General interrupt Status

    Modify

    • Accumulator

    Example

     jsr ch395_get_glob_int_status\n; check accumulator to get interrupts states\n
    "},{"location":"assembly/#ch395_get_ic_ver","title":"ch395_get_ic_ver","text":"

    Description

    Get ch395 firmware version

    Example

     jsr ch395_get_ic_ver\n; Check A for version\nrts\n

    Modify

    • Accumulator
    "},{"location":"assembly/#ch395_get_int_status_sn","title":"ch395_get_int_status_sn","text":"

    Description

    Check interrupt socket status

    Example

     lda #CH395_SOCKET1 ; Check socket 1\njsr ch395_get_int_status_sn\n; Check interrupt type\nrts\n

    Modify

    • Accumulator
    • X Register

    Returns

    • Accumulator : Status of selected socket
    "},{"location":"assembly/#ch395_get_ip_inf","title":"ch395_get_ip_inf","text":"

    Modify

    • Accumulator
    • X Register
    • Y Register
    "},{"location":"assembly/#ch395_get_mac_adress","title":"ch395_get_mac_adress","text":"

    Modify

    • Accumulator
    • X Register
    • Y Register
    "},{"location":"assembly/#ch395_get_phy_status","title":"ch395_get_phy_status","text":"

    Modify

    • Accumulator
    "},{"location":"assembly/#ch395_get_recv_len_sn","title":"ch395_get_recv_len_sn","text":"

    Description

    Get the length received from socket

    Example

     lda #$01 ; Socket 1\njsr ch395_get_recv_len_sn\n; check A and X for length received\nch395_connected:\n

    Modify

    • Accumulator
    • X Register

    Returns

    • Accumulator : The length

    • X Register : The length

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

    Modify

    • Accumulator
    • X Register
    • Y Register
    "},{"location":"assembly/#ch395_get_socket_status_sn","title":"ch395_get_socket_status_sn","text":"

    Description

    Returns in A socket status (close/open)

    Modify

    • X Register
    • Accumulator
    "},{"location":"assembly/#ch395_init","title":"ch395_init","text":"

    Description

    Initialize ch395

    Modify

    • Accumulator
    "},{"location":"assembly/#ch395_open_socket_sn","title":"ch395_open_socket_sn","text":"

    Description

    Open socket from arg

    Input

    • Accumulator : Socket id

    Modify

    • Y Register
    "},{"location":"assembly/#ch395_read_recv_buf_sn","title":"ch395_read_recv_buf_sn","text":""},{"location":"assembly/#ch395_reset_all","title":"ch395_reset_all","text":"

    Description

    Reset ch395

    Example

     jsr ch395_reset_all\n; Wait a bit\n
    "},{"location":"assembly/#ch395_retran_period","title":"ch395_retran_period","text":"

    Description

    Retran period

    Example

     lda #$FF\nldx #$FF\njsr ch395_retran_period\nrts\n

    Input

    • Accumulator : Period
    • X Register : Period

    Modify

    • Y Register
    "},{"location":"assembly/#ch395_set_des_port_sn","title":"ch395_set_des_port_sn","text":""},{"location":"assembly/#ch395_set_fun_para","title":"ch395_set_fun_para","text":"

    Input

    • Accumulator : Value

    Modify

    • Y Register
    • Accumulator
    "},{"location":"assembly/#ch395_set_gwip_addr","title":"ch395_set_gwip_addr","text":""},{"location":"assembly/#ch395_set_ip_addr","title":"ch395_set_ip_addr","text":"

    Description

    Set ip addr

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

    Description

    Set Socket Ip address to connect with

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

    Description

    Set ipraw protocol on socket

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

    Description

    Set mac address

    "},{"location":"assembly/#ch395_set_proto_type_sn","title":"ch395_set_proto_type_sn","text":""},{"location":"assembly/#ch395_set_retran_count","title":"ch395_set_retran_count","text":""},{"location":"assembly/#ch395_set_sour_port_sn","title":"ch395_set_sour_port_sn","text":""},{"location":"assembly/#ch395_tcp_connect_sn","title":"ch395_tcp_connect_sn","text":""},{"location":"assembly/#ch395_tcp_disconnect_sn","title":"ch395_tcp_disconnect_sn","text":""},{"location":"assembly/#ch395_tcp_listen_sn","title":"ch395_tcp_listen_sn","text":""},{"location":"assembly/#ch395_write_send_buf_sn","title":"ch395_write_send_buf_sn","text":""},{"location":"c/","title":"C","text":""},{"location":"c/#c","title":"C","text":""},{"location":"c/#unsigned-char-ch395_check_exist","title":"unsigned char ch395_check_exist();","text":""},{"location":"c/#void-ch395_clear_recv_buf_snunsigned-char-id_socket","title":"void ch395_clear_recv_buf_sn(unsigned char ID_SOCKET)","text":"

    Description

    Clear receive buffer

    "},{"location":"c/#oid-ch395_close_socket_snunsigned-char-id_socket","title":"oid ch395_close_socket_sn(unsigned char ID_SOCKET)","text":"

    Description

    Close socket

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

    Description

    Get dhcp status

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

    Description

    Get General interrupt Status

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

    Description

    Get ch395 firmware version

    "},{"location":"c/#unsigned-char-ch395_get_int_status_snunsigned-char-id_socket","title":"unsigned char ch395_get_int_status_sn(unsigned char ID_SOCKET);","text":"

    Description

    Check interrupt socket status

    "},{"location":"c/#void-ch395_get_recv_len_snunsigned-char-id_socket","title":"void ch395_get_recv_len_sn(unsigned char ID_SOCKET)","text":"

    Description

    Get the length received from socket

    "},{"location":"c/#unsigned-int-ch395_get_socket_status_snunsigned-char-id_socket","title":"unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET);","text":""},{"location":"c/#void-ch395_init","title":"void ch395_init();","text":"

    Description

    Initialize ch395

    "},{"location":"c/#void-ch395_open_socket_snunsigned-char-id_socket","title":"void ch395_open_socket_sn(unsigned char ID_SOCKET)","text":""},{"location":"c/#void-ch395_read_recv_buf_snunsigned-char-buffer-unsigned-int-lengthunsigned-char-id_socket","title":"void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET);","text":""},{"location":"c/#void-ch395_reset_all","title":"void ch395_reset_all()","text":"

    Description

    Reset ch395

    "},{"location":"c/#void-ch395_set_fun_paraunsigned-char-flag","title":"void ch395_set_fun_para(unsigned char flag)","text":"

    Description

    Set ip addr

    "},{"location":"c/#void-ch395_set_ip_addr_snunsigned-char-ip_addr-unsigned-char-id_socket","title":"void ch395_set_ip_addr_sn(unsigned char ip_addr[], unsigned char ID_SOCKET)","text":"

    Description

    Set ipraw protocol on socket

    "},{"location":"c/#void-ch395_set_proto_type_snunsigned-char-protounsigned-char-id_socket","title":"void ch395_set_proto_type_sn(unsigned char proto,unsigned char ID_SOCKET)","text":""},{"location":"c/#_1","title":"C","text":""},{"location":"2024.1/assembly/","title":"Assembly","text":""},{"location":"2024.1/assembly/#assembly","title":"Assembly","text":""},{"location":"2024.1/assembly/#ch395_check_exist","title":"ch395_check_exist","text":"

    Description

    Checks if ch395 exists

    Example

     jsr ch395_get_glob_int_status\ncmp #CH395_DETECTED\nbeq ch395_connected\nrts\nch395_connected:\n

    Modify

    • Accumulator

    Returns

    • Accumulator : Returns #AA if it exists
    "},{"location":"2024.1/assembly/#ch395_clear_recv_buf_sn","title":"ch395_clear_recv_buf_sn","text":"

    Description

    Clear receive buffer

    Example

     lda #$01 ; Socket ID\njsr ch395_clear_recv_buf_sn\n

    Modify

    • Accumulator
    • Y Register
    "},{"location":"2024.1/assembly/#ch395_close_socket_sn","title":"ch395_close_socket_sn","text":"

    Description

    Close socket

    Example

     lda #$01 ; Socket ID\njsr ch395_close_socket_sn\n

    Input

    • Accumulator : The id of the socket to close

    Modify

    • Y Register
    "},{"location":"2024.1/assembly/#ch395_dhcp_enable","title":"ch395_dhcp_enable","text":"

    Description

    Enable or not dhcp

    Input

    • Accumulator : The mode to activate DHCP mode

    Modify

    • X Register
    "},{"location":"2024.1/assembly/#ch395_get_cmd_status","title":"ch395_get_cmd_status","text":"

    Description

    Get cmd status

    Example

     jsr ch395_get_cmd_status\n; Check A for STATUS\nrts\n

    Modify

    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_get_dhcp_status","title":"ch395_get_dhcp_status","text":"

    Description

    Get dhcp status

    Example

     jsr ch395_get_dhcp_status\n; Check A for dhcp status\nrts\n

    Modify

    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_get_glob_int_status","title":"ch395_get_glob_int_status","text":"

    Description

    Get General interrupt Status

    Modify

    • Accumulator

    Example

     jsr ch395_get_glob_int_status\n; check accumulator to get interrupts states\n
    "},{"location":"2024.1/assembly/#ch395_get_ic_ver","title":"ch395_get_ic_ver","text":"

    Description

    Get ch395 firmware version

    Example

     jsr ch395_get_ic_ver\n; Check A for version\nrts\n

    Modify

    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_get_int_status_sn","title":"ch395_get_int_status_sn","text":"

    Description

    Check interrupt socket status

    Example

     lda #CH395_SOCKET1 ; Check socket 1\njsr ch395_get_int_status_sn\n; Check interrupt type\nrts\n

    Modify

    • Accumulator
    • X Register

    Returns

    • Accumulator : Status of selected socket
    "},{"location":"2024.1/assembly/#ch395_get_ip_inf","title":"ch395_get_ip_inf","text":"

    Modify

    • Accumulator
    • X Register
    • Y Register
    "},{"location":"2024.1/assembly/#ch395_get_mac_adress","title":"ch395_get_mac_adress","text":"

    Modify

    • Accumulator
    • X Register
    • Y Register
    "},{"location":"2024.1/assembly/#ch395_get_phy_status","title":"ch395_get_phy_status","text":"

    Modify

    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_get_recv_len_sn","title":"ch395_get_recv_len_sn","text":"

    Description

    Get the length received from socket

    Example

     lda #$01 ; Socket 1\njsr ch395_get_recv_len_sn\n; check A and X for length received\nch395_connected:\n

    Modify

    • Accumulator
    • X Register

    Returns

    • Accumulator : The length

    • X Register : The length

    "},{"location":"2024.1/assembly/#ch395_get_remot_ipp_sn","title":"ch395_get_remot_ipp_sn","text":"

    Modify

    • Accumulator
    • X Register
    • Y Register
    "},{"location":"2024.1/assembly/#ch395_get_socket_status_sn","title":"ch395_get_socket_status_sn","text":"

    Description

    Returns in A socket status (close/open)

    Modify

    • X Register
    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_init","title":"ch395_init","text":"

    Description

    Initialize ch395

    Modify

    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_open_socket_sn","title":"ch395_open_socket_sn","text":"

    Description

    Open socket from arg

    Input

    • Accumulator : Socket id

    Modify

    • Y Register
    "},{"location":"2024.1/assembly/#ch395_read_recv_buf_sn","title":"ch395_read_recv_buf_sn","text":""},{"location":"2024.1/assembly/#ch395_reset_all","title":"ch395_reset_all","text":"

    Description

    Reset ch395

    Example

     jsr ch395_reset_all\n; Wait a bit\n
    "},{"location":"2024.1/assembly/#ch395_retran_period","title":"ch395_retran_period","text":"

    Description

    Retran period

    Example

     lda #$FF\nldx #$FF\njsr ch395_retran_period\nrts\n

    Input

    • Accumulator : Period
    • X Register : Period

    Modify

    • Y Register
    "},{"location":"2024.1/assembly/#ch395_set_des_port_sn","title":"ch395_set_des_port_sn","text":""},{"location":"2024.1/assembly/#ch395_set_fun_para","title":"ch395_set_fun_para","text":"

    Input

    • Accumulator : Value

    Modify

    • Y Register
    • Accumulator
    "},{"location":"2024.1/assembly/#ch395_set_gwip_addr","title":"ch395_set_gwip_addr","text":""},{"location":"2024.1/assembly/#ch395_set_ip_addr","title":"ch395_set_ip_addr","text":"

    Description

    Set ip addr

    "},{"location":"2024.1/assembly/#ch395_set_ip_addr_sn","title":"ch395_set_ip_addr_sn","text":"

    Description

    Set Socket Ip address to connect with

    "},{"location":"2024.1/assembly/#ch395_set_ipraw_pro_sn","title":"ch395_set_ipraw_pro_sn","text":"

    Description

    Set ipraw protocol on socket

    "},{"location":"2024.1/assembly/#ch395_set_mac_adress","title":"ch395_set_mac_adress","text":"

    Description

    Set mac address

    "},{"location":"2024.1/assembly/#ch395_set_proto_type_sn","title":"ch395_set_proto_type_sn","text":""},{"location":"2024.1/assembly/#ch395_set_retran_count","title":"ch395_set_retran_count","text":""},{"location":"2024.1/assembly/#ch395_set_sour_port_sn","title":"ch395_set_sour_port_sn","text":""},{"location":"2024.1/assembly/#ch395_tcp_connect_sn","title":"ch395_tcp_connect_sn","text":""},{"location":"2024.1/assembly/#ch395_tcp_disconnect_sn","title":"ch395_tcp_disconnect_sn","text":""},{"location":"2024.1/assembly/#ch395_tcp_listen_sn","title":"ch395_tcp_listen_sn","text":""},{"location":"2024.1/assembly/#ch395_write_send_buf_sn","title":"ch395_write_send_buf_sn","text":""},{"location":"2024.1/c/","title":"C","text":""},{"location":"2024.1/c/#c","title":"C","text":""},{"location":"2024.1/c/#unsigned-char-ch395_check_exist","title":"unsigned char ch395_check_exist();","text":""},{"location":"2024.1/c/#void-ch395_clear_recv_buf_snunsigned-char-id_socket","title":"void ch395_clear_recv_buf_sn(unsigned char ID_SOCKET)","text":"

    Description

    Clear receive buffer

    "},{"location":"2024.1/c/#oid-ch395_close_socket_snunsigned-char-id_socket","title":"oid ch395_close_socket_sn(unsigned char ID_SOCKET)","text":"

    Description

    Close socket

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

    Description

    Get dhcp status

    "},{"location":"2024.1/c/#unsigned-int-ch395_get_glob_int_status","title":"unsigned int ch395_get_glob_int_status();","text":"

    Description

    Get General interrupt Status

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

    Description

    Get ch395 firmware version

    "},{"location":"2024.1/c/#unsigned-char-ch395_get_int_status_snunsigned-char-id_socket","title":"unsigned char ch395_get_int_status_sn(unsigned char ID_SOCKET);","text":"

    Description

    Check interrupt socket status

    "},{"location":"2024.1/c/#void-ch395_get_recv_len_snunsigned-char-id_socket","title":"void ch395_get_recv_len_sn(unsigned char ID_SOCKET)","text":"

    Description

    Get the length received from socket

    "},{"location":"2024.1/c/#unsigned-int-ch395_get_socket_status_snunsigned-char-id_socket","title":"unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET);","text":""},{"location":"2024.1/c/#void-ch395_init","title":"void ch395_init();","text":"

    Description

    Initialize ch395

    "},{"location":"2024.1/c/#void-ch395_open_socket_snunsigned-char-id_socket","title":"void ch395_open_socket_sn(unsigned char ID_SOCKET)","text":""},{"location":"2024.1/c/#void-ch395_read_recv_buf_snunsigned-char-buffer-unsigned-int-lengthunsigned-char-id_socket","title":"void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET);","text":""},{"location":"2024.1/c/#void-ch395_reset_all","title":"void ch395_reset_all()","text":"

    Description

    Reset ch395

    "},{"location":"2024.1/c/#void-ch395_set_fun_paraunsigned-char-flag","title":"void ch395_set_fun_para(unsigned char flag)","text":"

    Description

    Set ip addr

    "},{"location":"2024.1/c/#void-ch395_set_ip_addr_snunsigned-char-ip_addr-unsigned-char-id_socket","title":"void ch395_set_ip_addr_sn(unsigned char ip_addr[], unsigned char ID_SOCKET)","text":"

    Description

    Set ipraw protocol on socket

    "},{"location":"2024.1/c/#void-ch395_set_proto_type_snunsigned-char-protounsigned-char-id_socket","title":"void ch395_set_proto_type_sn(unsigned char proto,unsigned char ID_SOCKET)","text":""},{"location":"2024.1/c/#_1","title":"C","text":""}]} \ No newline at end of file diff --git a/docs/api/sitemap.xml.gz b/docs/api/sitemap.xml.gz index 9ef9e03..13eb20a 100644 Binary files a/docs/api/sitemap.xml.gz and b/docs/api/sitemap.xml.gz differ diff --git a/docs/code/2024.1/assembly.md b/docs/code/2024.1/assembly.md index 1d435f2..8e16571 100644 --- a/docs/code/2024.1/assembly.md +++ b/docs/code/2024.1/assembly.md @@ -11,7 +11,7 @@ Checks if ch395 exists ```ca65 jsr ch395_get_glob_int_status - cmp #$AA + cmp #CH395_DETECTED beq ch395_connected rts ch395_connected: @@ -35,6 +35,14 @@ ch395_connected: Clear receive buffer +***Example*** + +```ca65 + lda #$01 ; Socket ID + jsr ch395_clear_recv_buf_sn +``` + + ***Modify*** * Accumulator @@ -47,9 +55,17 @@ Clear receive buffer Close socket + +***Example*** + +```ca65 + lda #$01 ; Socket ID + jsr ch395_close_socket_sn +``` + ***Input*** -* Accumulator : The id of the socket +* Accumulator : The id of the socket to close ***Modify*** @@ -78,6 +94,15 @@ Enable or not dhcp Get cmd status +***Example*** + +```ca65 + jsr ch395_get_cmd_status + ; Check A for STATUS + rts +``` + + ***Modify*** * Accumulator @@ -85,6 +110,19 @@ Get cmd status ## ch395_get_dhcp_status +***Description*** + +Get dhcp status + + +***Example*** + +```ca65 + jsr ch395_get_dhcp_status + ; Check A for dhcp status + rts +``` + ***Modify*** @@ -118,6 +156,15 @@ Get General interrupt Status Get ch395 firmware version +***Example*** + +```ca65 + jsr ch395_get_ic_ver + ; Check A for version + rts +``` + + ***Modify*** * Accumulator @@ -125,11 +172,40 @@ Get ch395 firmware version ## ch395_get_int_status_sn +***Description*** + +Check interrupt socket status + + +***Example*** + +```ca65 + lda #CH395_SOCKET1 ; Check socket 1 + jsr ch395_get_int_status_sn + ; Check interrupt type + rts +``` + + +***Modify*** + +* Accumulator +* X Register + +***Returns*** + +* Accumulator : Status of selected socket + + + +## ch395_get_ip_inf + ***Modify*** * Accumulator * X Register +* Y Register ## ch395_get_mac_adress @@ -205,6 +281,10 @@ Returns in A socket status (close/open) ## ch395_init +***Description*** + +Initialize ch395 + ***Modify*** @@ -213,6 +293,17 @@ Returns in A socket status (close/open) ## ch395_open_socket_sn +***Description*** + +Open socket from arg + +***Input*** + +* Accumulator : Socket id + +***Modify*** + +* Y Register ## ch395_read_recv_buf_sn @@ -248,8 +339,17 @@ Retran period lda #$FF ldx #$FF jsr ch395_retran_period + rts ``` +***Input*** + +* Accumulator : Period +* X Register : Period + +***Modify*** + +* Y Register ## ch395_set_des_port_sn diff --git a/docs/code/2024.1/c.md b/docs/code/2024.1/c.md index 26d1b16..a7dc220 100644 --- a/docs/code/2024.1/c.md +++ b/docs/code/2024.1/c.md @@ -24,6 +24,12 @@ Close socket +## unsigned char ch395_get_dhcp_status(); + +***Description*** + +Get dhcp status + ## unsigned int ch395_get_glob_int_status(); @@ -34,6 +40,8 @@ Get General interrupt Status +## unsigned char ch395_get_ic_ver(); + ***Description*** Get ch395 firmware version @@ -42,6 +50,10 @@ Get ch395 firmware version ## unsigned char ch395_get_int_status_sn(unsigned char ID_SOCKET); +***Description*** + +Check interrupt socket status + @@ -64,12 +76,20 @@ Get the length received from socket +## void ch395_init(); + +***Description*** + +Initialize ch395 + ## void ch395_open_socket_sn(unsigned char ID_SOCKET) +## void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); + ## void ch395_reset_all() diff --git a/docs/code/assembly.md b/docs/code/assembly.md index 1d435f2..8e16571 100644 --- a/docs/code/assembly.md +++ b/docs/code/assembly.md @@ -11,7 +11,7 @@ Checks if ch395 exists ```ca65 jsr ch395_get_glob_int_status - cmp #$AA + cmp #CH395_DETECTED beq ch395_connected rts ch395_connected: @@ -35,6 +35,14 @@ ch395_connected: Clear receive buffer +***Example*** + +```ca65 + lda #$01 ; Socket ID + jsr ch395_clear_recv_buf_sn +``` + + ***Modify*** * Accumulator @@ -47,9 +55,17 @@ Clear receive buffer Close socket + +***Example*** + +```ca65 + lda #$01 ; Socket ID + jsr ch395_close_socket_sn +``` + ***Input*** -* Accumulator : The id of the socket +* Accumulator : The id of the socket to close ***Modify*** @@ -78,6 +94,15 @@ Enable or not dhcp Get cmd status +***Example*** + +```ca65 + jsr ch395_get_cmd_status + ; Check A for STATUS + rts +``` + + ***Modify*** * Accumulator @@ -85,6 +110,19 @@ Get cmd status ## ch395_get_dhcp_status +***Description*** + +Get dhcp status + + +***Example*** + +```ca65 + jsr ch395_get_dhcp_status + ; Check A for dhcp status + rts +``` + ***Modify*** @@ -118,6 +156,15 @@ Get General interrupt Status Get ch395 firmware version +***Example*** + +```ca65 + jsr ch395_get_ic_ver + ; Check A for version + rts +``` + + ***Modify*** * Accumulator @@ -125,11 +172,40 @@ Get ch395 firmware version ## ch395_get_int_status_sn +***Description*** + +Check interrupt socket status + + +***Example*** + +```ca65 + lda #CH395_SOCKET1 ; Check socket 1 + jsr ch395_get_int_status_sn + ; Check interrupt type + rts +``` + + +***Modify*** + +* Accumulator +* X Register + +***Returns*** + +* Accumulator : Status of selected socket + + + +## ch395_get_ip_inf + ***Modify*** * Accumulator * X Register +* Y Register ## ch395_get_mac_adress @@ -205,6 +281,10 @@ Returns in A socket status (close/open) ## ch395_init +***Description*** + +Initialize ch395 + ***Modify*** @@ -213,6 +293,17 @@ Returns in A socket status (close/open) ## ch395_open_socket_sn +***Description*** + +Open socket from arg + +***Input*** + +* Accumulator : Socket id + +***Modify*** + +* Y Register ## ch395_read_recv_buf_sn @@ -248,8 +339,17 @@ Retran period lda #$FF ldx #$FF jsr ch395_retran_period + rts ``` +***Input*** + +* Accumulator : Period +* X Register : Period + +***Modify*** + +* Y Register ## ch395_set_des_port_sn diff --git a/docs/code/c.md b/docs/code/c.md index 26d1b16..a7dc220 100644 --- a/docs/code/c.md +++ b/docs/code/c.md @@ -24,6 +24,12 @@ Close socket +## unsigned char ch395_get_dhcp_status(); + +***Description*** + +Get dhcp status + ## unsigned int ch395_get_glob_int_status(); @@ -34,6 +40,8 @@ Get General interrupt Status +## unsigned char ch395_get_ic_ver(); + ***Description*** Get ch395 firmware version @@ -42,6 +50,10 @@ Get ch395 firmware version ## unsigned char ch395_get_int_status_sn(unsigned char ID_SOCKET); +***Description*** + +Check interrupt socket status + @@ -64,12 +76,20 @@ Get the length received from socket +## void ch395_init(); + +***Description*** + +Initialize ch395 + ## void ch395_open_socket_sn(unsigned char ID_SOCKET) +## void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); + ## void ch395_reset_all() diff --git a/src/6502/_ch395_check_exist.s b/src/6502/_ch395_check_exist.s index aab3a69..84f9a5d 100644 --- a/src/6502/_ch395_check_exist.s +++ b/src/6502/_ch395_check_exist.s @@ -9,7 +9,7 @@ ;;@proto unsigned char ch395_check_exist(); ;;@```c ;;@` val = ch395_get_glob_int_status(); - ;;@` if (val == 0xAA) printf("Ch395 is here"); + ;;@` if (val == CH395_DETECTED) printf("Ch395 is here"); ;;@``` .endproc @@ -17,7 +17,7 @@ ;;@brief Checks if ch395 exists ;;@```ca65 ;;@` jsr ch395_get_glob_int_status - ;;@` cmp #$AA + ;;@` cmp #CH395_DETECTED ;;@` beq ch395_connected ;;@` rts ;;@`ch395_connected: diff --git a/src/6502/_ch395_clear_recv_buf_sn.s b/src/6502/_ch395_clear_recv_buf_sn.s index 7cb5938..58bc588 100644 --- a/src/6502/_ch395_clear_recv_buf_sn.s +++ b/src/6502/_ch395_clear_recv_buf_sn.s @@ -8,11 +8,18 @@ .proc _ch395_clear_recv_buf_sn ;;@proto void ch395_clear_recv_buf_sn(unsigned char ID_SOCKET) ;;@brief Clear receive buffer + ;;@```c + ;;@` ch395_clear_recv_buf_sn(1); + ;;@``` .endproc .proc ch395_clear_recv_buf_sn ;;@brief Clear receive buffer + ;;@```ca65 + ;;@` lda #$01 ; Socket ID + ;;@` jsr ch395_clear_recv_buf_sn + ;;@``` ;;@modifyA ;;@modifyY ldy #CH395_CLEAR_RECV_BUF_SN diff --git a/src/6502/_ch395_close_socket_sn.s b/src/6502/_ch395_close_socket_sn.s index 28de315..872fb44 100644 --- a/src/6502/_ch395_close_socket_sn.s +++ b/src/6502/_ch395_close_socket_sn.s @@ -13,7 +13,11 @@ .proc ch395_close_socket_sn ;;@brief Close socket - ;;@inputA The id of the socket + ;;@```ca65 + ;;@` lda #$01 ; Socket ID + ;;@` jsr ch395_close_socket_sn + ;;@``` + ;;@inputA The id of the socket to close ;;@modifyY ldy #CH395_CLOSE_SOCKET_SN sty CH395_COMMAND_PORT diff --git a/src/6502/_ch395_get_cmd_status.s b/src/6502/_ch395_get_cmd_status.s index 80b7308..b5292bd 100644 --- a/src/6502/_ch395_get_cmd_status.s +++ b/src/6502/_ch395_get_cmd_status.s @@ -11,6 +11,11 @@ .proc ch395_get_cmd_status ;;@brief Get cmd status + ;;@```ca65 + ;;@` jsr ch395_get_cmd_status + ;;@` ; Check A for STATUS + ;;@` rts + ;;@``` ;;@modifyA lda #CH395_GET_CMD_STATUS sta CH395_COMMAND_PORT diff --git a/src/6502/_ch395_get_dhcp_status.s b/src/6502/_ch395_get_dhcp_status.s index 194a85a..a380929 100644 --- a/src/6502/_ch395_get_dhcp_status.s +++ b/src/6502/_ch395_get_dhcp_status.s @@ -6,9 +6,17 @@ .export ch395_get_dhcp_status .proc _ch395_get_dhcp_status + ;;@proto unsigned char ch395_get_dhcp_status(); + ;;@brief Get dhcp status .endproc .proc ch395_get_dhcp_status + ;;@brief Get dhcp status + ;;@```ca65 + ;;@` jsr ch395_get_dhcp_status + ;;@` ; Check A for dhcp status + ;;@` rts + ;;@``` ;;@modifyA lda #CH395_GET_DHCP_STATUS sta CH395_COMMAND_PORT diff --git a/src/6502/_ch395_get_ic_ver.s b/src/6502/_ch395_get_ic_ver.s index 8b33c4b..4f6d4a9 100644 --- a/src/6502/_ch395_get_ic_ver.s +++ b/src/6502/_ch395_get_ic_ver.s @@ -7,11 +7,17 @@ .export ch395_get_ic_ver .proc _ch395_get_ic_ver + ;;@proto unsigned char ch395_get_ic_ver(); ;;@brief Get ch395 firmware version .endproc .proc ch395_get_ic_ver ;;@brief Get ch395 firmware version + ;;@```ca65 + ;;@` jsr ch395_get_ic_ver + ;;@` ; Check A for version + ;;@` rts + ;;@``` ;;@modifyA lda #CH395_GET_IC_VER sta CH395_COMMAND_PORT diff --git a/src/6502/_ch395_get_int_status_sn.s b/src/6502/_ch395_get_int_status_sn.s index 4f407db..e76fa2b 100644 --- a/src/6502/_ch395_get_int_status_sn.s +++ b/src/6502/_ch395_get_int_status_sn.s @@ -7,11 +7,20 @@ .proc _ch395_get_int_status_sn ;;@proto unsigned char ch395_get_int_status_sn(unsigned char ID_SOCKET); + ;;@brief Check interrupt socket status .endproc .proc ch395_get_int_status_sn + ;;@brief Check interrupt socket status + ;;@```ca65 + ;;@` lda #CH395_SOCKET1 ; Check socket 1 + ;;@` jsr ch395_get_int_status_sn + ;;@` ; Check interrupt type + ;;@` rts + ;;@``` ;;@modifyA ;;@modifyX + ;;@returnsA Status of selected socket ldx #CH395_GET_INT_STATUS_SN stx CH395_COMMAND_PORT sta CH395_DATA_PORT diff --git a/src/6502/_ch395_get_ip_inf.s b/src/6502/_ch395_get_ip_inf.s index 5efb95d..0099fdd 100644 --- a/src/6502/_ch395_get_ip_inf.s +++ b/src/6502/_ch395_get_ip_inf.s @@ -5,12 +5,16 @@ .include "telestrat.inc" .export _ch395_get_ip_inf +.export ch395_get_ip_inf .ifndef ptr1 .importzp ptr1 .endif .proc _ch395_get_ip_inf +.endproc + +.proc ch395_get_ip_inf ;;@modifyA ;;@modifyX ;;@modifyY diff --git a/src/6502/_ch395_init.s b/src/6502/_ch395_init.s index 24a5ac6..c63a595 100644 --- a/src/6502/_ch395_init.s +++ b/src/6502/_ch395_init.s @@ -6,9 +6,12 @@ .export ch395_init .proc _ch395_init + ;;@proto void ch395_init(); + ;;@brief Initialize ch395 .endproc .proc ch395_init + ;;@brief Initialize ch395 ;;@modifyA lda #CH395_INIT sta CH395_COMMAND_PORT diff --git a/src/6502/_ch395_open_socket_sn.s b/src/6502/_ch395_open_socket_sn.s index 4a1f80c..20f5c43 100644 --- a/src/6502/_ch395_open_socket_sn.s +++ b/src/6502/_ch395_open_socket_sn.s @@ -10,6 +10,9 @@ .endproc .proc ch395_open_socket_sn + ;;@brief Open socket from arg + ;;@inputA Socket id + ;;@modifyY ldy #CH395_OPEN_SOCKET_SN sty CH395_COMMAND_PORT sta CH395_DATA_PORT ; Send socket id diff --git a/src/6502/_ch395_read_recv_buf_sn.s b/src/6502/_ch395_read_recv_buf_sn.s index d788a12..5a9f711 100644 --- a/src/6502/_ch395_read_recv_buf_sn.s +++ b/src/6502/_ch395_read_recv_buf_sn.s @@ -9,9 +9,10 @@ .export _ch395_read_recv_buf_sn .export ch395_read_recv_buf_sn -; void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET) + .proc _ch395_read_recv_buf_sn + ;;@proto void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); .endproc .proc ch395_read_recv_buf_sn diff --git a/src/6502/_ch395_retran_period.s b/src/6502/_ch395_retran_period.s index 07fed71..0a695bb 100644 --- a/src/6502/_ch395_retran_period.s +++ b/src/6502/_ch395_retran_period.s @@ -14,7 +14,11 @@ ;;@` lda #$FF ;;@` ldx #$FF ;;@` jsr ch395_retran_period + ;;@` rts ;;@``` + ;;@inputA Period + ;;@inputX Period + ;;@modifyY ldy #CH395_SET_RETRAN_PERIOD sty CH395_COMMAND_PORT sta CH395_DATA_PORT diff --git a/src/include/ch395.h b/src/include/ch395.h index 96b9cf5..1af2b80 100644 --- a/src/include/ch395.h +++ b/src/include/ch395.h @@ -37,6 +37,7 @@ void ch395_clear_recv_buf_sn(unsigned char socket); void ch395_set_fun_para(unsigned char flag); void ch395_tcp_disconnect_sn(unsigned char ID_SOCKET); +#define CH395_DETECTED 0xaa //void ch395_set_gwip_addr(ch395ipaddress gatewayipadress); diff --git a/src/include/ch395.inc b/src/include/ch395.inc index a85ac5a..b8cd4a8 100644 --- a/src/include/ch395.inc +++ b/src/include/ch395.inc @@ -5,6 +5,8 @@ ; 4KEEPROM ; 8 GPIO +CH395_DETECTED = $AA + CH395_COMMAND_PORT := $381 CH395_DATA_PORT := $380