diff --git a/docs/api/2024.1/assembly/index.html b/docs/api/2024.1/assembly/index.html index 3b9346f..d40de18 100644 --- a/docs/api/2024.1/assembly/index.html +++ b/docs/api/2024.1/assembly/index.html @@ -971,13 +971,13 @@
Returns
Description
Clear receive buffer
Example
- lda #$01 ; Socket ID
+ lda #CH395_SOCKET1 ; Socket ID
jsr ch395_clear_recv_buf_sn
Modify
@@ -988,10 +988,6 @@ 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 to close
@@ -1000,6 +996,10 @@ ch395_close_socket_sn
- Y Register
+Example
+ lda #$01 ; Socket ID
+ jsr ch395_close_socket_sn
+
ch395_dhcp_enable
Description
Enable or not dhcp
@@ -1274,9 +1274,13 @@ ch395_tcp_connect_sn
ch395_tcp_disconnect_sn
ch395_tcp_listen_sn
ch395_write_send_buf_sn
+Description
+Send data to socketid
Input
- Accumulator : Socket ID
+- Y Register : Low length
+- X Register : High length
Description
+Checks if ch395 exists
Description
Clear receive buffer
-Description
Close socket
+Input
Description
Get dhcp status
@@ -916,6 +919,7 @@Description
Check interrupt socket status
+Input
Description
Get ip info
@@ -928,17 +932,22 @@Description
Get the length received from socket
+Input
Description
Get remote ip connected to the socket
+Input
Description
Returns in A socket status (close/open ... )
+Input
Description
Initialize ch395
Input
Input
Description
Reset ch395
@@ -946,6 +955,7 @@Description
Retran period
Input
Description
Set fun para
@@ -957,16 +967,26 @@Description
Set ipraw protocol on socket
+Input
Input
Description
Set retran period
Description
+Set source socket
+Input
Input
Input
Description
+Send data to socketid
+Input
Returns
Description
Clear receive buffer
Example
- lda #$01 ; Socket ID
+ lda #CH395_SOCKET1 ; Socket ID
jsr ch395_clear_recv_buf_sn
Modify
@@ -698,10 +698,6 @@ 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 to close
@@ -710,6 +706,10 @@ ch395_close_socket_sn
- Y Register
+Example
+ lda #$01 ; Socket ID
+ jsr ch395_close_socket_sn
+
ch395_dhcp_enable
Description
Enable or not dhcp
@@ -984,9 +984,13 @@ ch395_tcp_connect_sn
ch395_tcp_disconnect_sn
ch395_tcp_listen_sn
ch395_write_send_buf_sn
+Description
+Send data to socketid
Input
- Accumulator : Socket ID
+- Y Register : Low length
+- X Register : High length
Description
+Checks if ch395 exists
Description
Clear receive buffer
-Description
Close socket
+Input
Description
Get dhcp status
@@ -656,6 +659,7 @@Description
Check interrupt socket status
+Input
Description
Get ip info
@@ -668,17 +672,22 @@Description
Get the length received from socket
+Input
Description
Get remote ip connected to the socket
+Input
Description
Returns in A socket status (close/open ... )
+Input
Description
Initialize ch395
Input
Input
Description
Reset ch395
@@ -686,6 +695,7 @@Description
Retran period
Input
Description
Set fun para
@@ -697,16 +707,26 @@Description
Set ipraw protocol on socket
+Input
Input
Description
Set retran period
Description
+Set source socket
+Input
Input
Input
Description
+Send data to socketid
+Input
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
Returns
Description
Clear receive buffer
Example
lda #$01 ; Socket ID\njsr ch395_clear_recv_buf_sn\n
Modify
Description
Close socket
Example
lda #$01 ; Socket ID\njsr ch395_close_socket_sn\n
Input
Modify
Description
Enable or not dhcp
Input
Modify
Description
Get cmd status
Example
jsr ch395_get_cmd_status\n; Check A for STATUS\nrts\n
Modify
Description
Get dhcp status
Example
jsr ch395_get_dhcp_status\n; Check A for dhcp status\nrts\n
Modify
Description
Get General interrupt Status
Modify
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
Description
Check interrupt socket status
Modify
Returns
Example
lda #CH395_SOCKET1 ; Check socket 1\njsr ch395_get_int_status_sn\n; Check interrupt type\nrts\n
"},{"location":"assembly/#ch395_get_ip_inf","title":"ch395_get_ip_inf","text":"Description
Get ip info
Input
Modify
Description
Get mac address
Input
Modify
Returns
Accumulator : the content of ptr modified
X Register : the content of ptr modified
Description
Get physical status
Modify
Returns
Example
jsr ch395_get_phy_status\n; Check A physical status\nrts\n
"},{"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
Returns
Accumulator : The length
X Register : The length
Description
Get remote ip connected to the socket
Input
Modify
Description
Returns in A socket status (close/open ...)
Modify
Returns
Accumulator : The status
X Register : The state
Example
lda #$01 ; Socket 1\njsr ch395_get_socket_status_sn\n; check A and X for the state\n
"},{"location":"assembly/#ch395_init","title":"ch395_init","text":"Description
Initialize ch395
Modify
Description
Open socket from arg
Input
Modify
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
Input
Modify
Example
lda #$FF\nldx #$FF\njsr ch395_retran_period\nrts\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":"Description
Set fun para
Input
Modify
Description
Set gateway ip addr
"},{"location":"assembly/#ch395_set_ip_addr","title":"ch395_set_ip_addr","text":"Description
Set ip row
"},{"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":"Description
Set retran period
Input
Input
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_ip_infunsigned-char-ip_infos","title":"void ch395_get_ip_inf(unsigned char ip_infos[]);","text":"Description
Get ip info
"},{"location":"c/#void-ch395_get_mac_adressunsigned-char-macaddress","title":"void ch395_get_mac_adress(unsigned char macaddress[]);","text":"Description
Get mac address
"},{"location":"c/#unsigned-char-ch395_get_phy_status","title":"unsigned char ch395_get_phy_status();","text":"Description
Get physical 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/#void-ch395_get_remot_ipp_snunsigned-char-ptr-unsigned-char-socket","title":"void ch395_get_remot_ipp_sn(unsigned char *ptr, unsigned char socket);","text":"Description
Get remote ip connected to the 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":"Description
Returns in A socket status (close/open ... )
"},{"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_retran_periodunsigned-int-period","title":"void ch395_retran_period(unsigned int period);","text":"Description
Retran period
"},{"location":"c/#void-ch395_set_des_port_snunsigned-int-port-unsigned-char-id_socket","title":"void ch395_set_des_port_sn(unsigned int port, unsigned char ID_SOCKET);","text":""},{"location":"c/#void-ch395_set_fun_paraunsigned-char-flag","title":"void ch395_set_fun_para(unsigned char flag)","text":"Description
Set fun para
Description
Set gateway ip addr
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":""},{"location":"c/#void-ch395_set_ipraw_pro_snunsigned-char-id_socket","title":"void ch395_set_ipraw_pro_sn(unsigned char ID_SOCKET);","text":"Description
Set ipraw protocol on socket
"},{"location":"c/#void-ch395_set_mac_adressunsigned-char-macaddress","title":"void ch395_set_mac_adress(unsigned char macaddress[]);","text":""},{"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/#void-ch395_set_retran_countunsigned-int-period","title":"void ch395_set_retran_count(unsigned int period);","text":"Description
Set retran period
"},{"location":"c/#void-ch395_set_sour_port_snunsigned-int-portunsigned-char-id_socket","title":"void ch395_set_sour_port_sn(unsigned int port,unsigned char ID_SOCKET)","text":""},{"location":"c/#void-ch395_tcp_connect_snunsigned-char-id_socket","title":"void ch395_tcp_connect_sn(unsigned char ID_SOCKET)","text":""},{"location":"c/#void-ch395_tcp_disconnect_snunsigned-char-id_socket","title":"void ch395_tcp_disconnect_sn(unsigned char ID_SOCKET)","text":""},{"location":"c/#void-ch395_tcp_listen_snunsigned-char-id_socket","title":"void ch395_tcp_listen_sn(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
Returns
Description
Clear receive buffer
Example
lda #$01 ; Socket ID\njsr ch395_clear_recv_buf_sn\n
Modify
Description
Close socket
Example
lda #$01 ; Socket ID\njsr ch395_close_socket_sn\n
Input
Modify
Description
Enable or not dhcp
Input
Modify
Description
Get cmd status
Example
jsr ch395_get_cmd_status\n; Check A for STATUS\nrts\n
Modify
Description
Get dhcp status
Example
jsr ch395_get_dhcp_status\n; Check A for dhcp status\nrts\n
Modify
Description
Get General interrupt Status
Modify
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
Description
Check interrupt socket status
Modify
Returns
Example
lda #CH395_SOCKET1 ; Check socket 1\njsr ch395_get_int_status_sn\n; Check interrupt type\nrts\n
"},{"location":"2024.1/assembly/#ch395_get_ip_inf","title":"ch395_get_ip_inf","text":"Description
Get ip info
Input
Modify
Description
Get mac address
Input
Modify
Returns
Accumulator : the content of ptr modified
X Register : the content of ptr modified
Description
Get physical status
Modify
Returns
Example
jsr ch395_get_phy_status\n; Check A physical status\nrts\n
"},{"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
Returns
Accumulator : The length
X Register : The length
Description
Get remote ip connected to the socket
Input
Modify
Description
Returns in A socket status (close/open ...)
Modify
Returns
Accumulator : The status
X Register : The state
Example
lda #$01 ; Socket 1\njsr ch395_get_socket_status_sn\n; check A and X for the state\n
"},{"location":"2024.1/assembly/#ch395_init","title":"ch395_init","text":"Description
Initialize ch395
Modify
Description
Open socket from arg
Input
Modify
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
Input
Modify
Example
lda #$FF\nldx #$FF\njsr ch395_retran_period\nrts\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":"Description
Set fun para
Input
Modify
Description
Set gateway ip addr
"},{"location":"2024.1/assembly/#ch395_set_ip_addr","title":"ch395_set_ip_addr","text":"Description
Set ip row
"},{"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":"Description
Set retran period
Input
Input
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_ip_infunsigned-char-ip_infos","title":"void ch395_get_ip_inf(unsigned char ip_infos[]);","text":"Description
Get ip info
"},{"location":"2024.1/c/#void-ch395_get_mac_adressunsigned-char-macaddress","title":"void ch395_get_mac_adress(unsigned char macaddress[]);","text":"Description
Get mac address
"},{"location":"2024.1/c/#unsigned-char-ch395_get_phy_status","title":"unsigned char ch395_get_phy_status();","text":"Description
Get physical 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/#void-ch395_get_remot_ipp_snunsigned-char-ptr-unsigned-char-socket","title":"void ch395_get_remot_ipp_sn(unsigned char *ptr, unsigned char socket);","text":"Description
Get remote ip connected to the 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":"Description
Returns in A socket status (close/open ... )
"},{"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_retran_periodunsigned-int-period","title":"void ch395_retran_period(unsigned int period);","text":"Description
Retran period
"},{"location":"2024.1/c/#void-ch395_set_des_port_snunsigned-int-port-unsigned-char-id_socket","title":"void ch395_set_des_port_sn(unsigned int port, unsigned char ID_SOCKET);","text":""},{"location":"2024.1/c/#void-ch395_set_fun_paraunsigned-char-flag","title":"void ch395_set_fun_para(unsigned char flag)","text":"Description
Set fun para
Description
Set gateway ip addr
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":""},{"location":"2024.1/c/#void-ch395_set_ipraw_pro_snunsigned-char-id_socket","title":"void ch395_set_ipraw_pro_sn(unsigned char ID_SOCKET);","text":"Description
Set ipraw protocol on socket
"},{"location":"2024.1/c/#void-ch395_set_mac_adressunsigned-char-macaddress","title":"void ch395_set_mac_adress(unsigned char macaddress[]);","text":""},{"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/#void-ch395_set_retran_countunsigned-int-period","title":"void ch395_set_retran_count(unsigned int period);","text":"Description
Set retran period
"},{"location":"2024.1/c/#void-ch395_set_sour_port_snunsigned-int-portunsigned-char-id_socket","title":"void ch395_set_sour_port_sn(unsigned int port,unsigned char ID_SOCKET)","text":""},{"location":"2024.1/c/#void-ch395_tcp_connect_snunsigned-char-id_socket","title":"void ch395_tcp_connect_sn(unsigned char ID_SOCKET)","text":""},{"location":"2024.1/c/#void-ch395_tcp_disconnect_snunsigned-char-id_socket","title":"void ch395_tcp_disconnect_sn(unsigned char ID_SOCKET)","text":""},{"location":"2024.1/c/#void-ch395_tcp_listen_snunsigned-char-id_socket","title":"void ch395_tcp_listen_sn(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
Returns
Description
Clear receive buffer
Example
lda #CH395_SOCKET1 ; Socket ID\njsr ch395_clear_recv_buf_sn\n
Modify
Description
Close socket
Input
Modify
Example
lda #$01 ; Socket ID\njsr ch395_close_socket_sn\n
"},{"location":"assembly/#ch395_dhcp_enable","title":"ch395_dhcp_enable","text":"Description
Enable or not dhcp
Input
Modify
Description
Get cmd status
Example
jsr ch395_get_cmd_status\n; Check A for STATUS\nrts\n
Modify
Description
Get dhcp status
Example
jsr ch395_get_dhcp_status\n; Check A for dhcp status\nrts\n
Modify
Description
Get General interrupt Status
Modify
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
Description
Check interrupt socket status
Modify
Returns
Example
lda #CH395_SOCKET1 ; Check socket 1\njsr ch395_get_int_status_sn\n; Check interrupt type\nrts\n
"},{"location":"assembly/#ch395_get_ip_inf","title":"ch395_get_ip_inf","text":"Description
Get ip info
Input
Modify
Description
Get mac address
Input
Modify
Returns
Accumulator : the content of ptr modified
X Register : the content of ptr modified
Description
Get physical status
Modify
Returns
Example
jsr ch395_get_phy_status\n; Check A physical status\nrts\n
"},{"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
Returns
Accumulator : The length
X Register : The length
Description
Get remote ip connected to the socket
Input
Modify
Description
Returns in A socket status (close/open ...)
Modify
Returns
Accumulator : The status
X Register : The state
Example
lda #$01 ; Socket 1\njsr ch395_get_socket_status_sn\n; check A and X for the state\n
"},{"location":"assembly/#ch395_init","title":"ch395_init","text":"Description
Initialize ch395
Modify
Description
Open socket from arg
Input
Modify
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
Input
Modify
Example
lda #$FF\nldx #$FF\njsr ch395_retran_period\nrts\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":"Description
Set fun para
Input
Modify
Description
Set gateway ip addr
"},{"location":"assembly/#ch395_set_ip_addr","title":"ch395_set_ip_addr","text":"Description
Set ip row
"},{"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":"Description
Set retran period
Input
Description
Send data to socketid
Input
Description
Checks if ch395 exists
"},{"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-socketid","title":"oid ch395_close_socket_sn(unsigned char socketid)","text":"Description
Close socket
Input
"},{"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
Input
"},{"location":"c/#void-ch395_get_ip_infunsigned-char-ip_infos","title":"void ch395_get_ip_inf(unsigned char ip_infos[]);","text":"Description
Get ip info
"},{"location":"c/#void-ch395_get_mac_adressunsigned-char-macaddress","title":"void ch395_get_mac_adress(unsigned char macaddress[]);","text":"Description
Get mac address
"},{"location":"c/#unsigned-char-ch395_get_phy_status","title":"unsigned char ch395_get_phy_status();","text":"Description
Get physical 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
Input
"},{"location":"c/#void-ch395_get_remot_ipp_snunsigned-char-ptr-unsigned-char-socket","title":"void ch395_get_remot_ipp_sn(unsigned char *ptr, unsigned char socket);","text":"Description
Get remote ip connected to the socket
Input
"},{"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":"Description
Returns in A socket status (close/open ... )
Input
"},{"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":"Input
"},{"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":"Input
"},{"location":"c/#void-ch395_reset_all","title":"void ch395_reset_all()","text":"Description
Reset ch395
"},{"location":"c/#void-ch395_retran_periodunsigned-int-period","title":"void ch395_retran_period(unsigned int period);","text":"Description
Retran period
"},{"location":"c/#void-ch395_set_des_port_snunsigned-int-port-unsigned-char-id_socket","title":"void ch395_set_des_port_sn(unsigned int port, unsigned char ID_SOCKET);","text":"Input
"},{"location":"c/#void-ch395_set_fun_paraunsigned-char-flag","title":"void ch395_set_fun_para(unsigned char flag)","text":"Description
Set fun para
Description
Set gateway ip addr
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":""},{"location":"c/#void-ch395_set_ipraw_pro_snunsigned-char-id_socket","title":"void ch395_set_ipraw_pro_sn(unsigned char ID_SOCKET);","text":"Description
Set ipraw protocol on socket
Input
"},{"location":"c/#void-ch395_set_mac_adressunsigned-char-macaddress","title":"void ch395_set_mac_adress(unsigned char macaddress[]);","text":""},{"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":"Input
"},{"location":"c/#void-ch395_set_retran_countunsigned-int-period","title":"void ch395_set_retran_count(unsigned int period);","text":"Description
Set retran period
"},{"location":"c/#void-ch395_set_sour_port_snunsigned-int-portunsigned-char-id_socket","title":"void ch395_set_sour_port_sn(unsigned int port,unsigned char ID_SOCKET)","text":"Description
Set source socket
Input
"},{"location":"c/#void-ch395_tcp_connect_snunsigned-char-id_socket","title":"void ch395_tcp_connect_sn(unsigned char ID_SOCKET)","text":"Input
"},{"location":"c/#void-ch395_tcp_disconnect_snunsigned-char-id_socket","title":"void ch395_tcp_disconnect_sn(unsigned char ID_SOCKET)","text":"Input
"},{"location":"c/#void-ch395_tcp_listen_snunsigned-char-id_socket","title":"void ch395_tcp_listen_sn(unsigned char ID_SOCKET)","text":""},{"location":"c/#void-ch395_write_send_buf_snunsigned-char-buffer-unsigned-int-lengthunsigned-char-id_socket","title":"void ch395_write_send_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET);","text":"Description
Send data to socketid
Input
"},{"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
Returns
Description
Clear receive buffer
Example
lda #CH395_SOCKET1 ; Socket ID\njsr ch395_clear_recv_buf_sn\n
Modify
Description
Close socket
Input
Modify
Example
lda #$01 ; Socket ID\njsr ch395_close_socket_sn\n
"},{"location":"2024.1/assembly/#ch395_dhcp_enable","title":"ch395_dhcp_enable","text":"Description
Enable or not dhcp
Input
Modify
Description
Get cmd status
Example
jsr ch395_get_cmd_status\n; Check A for STATUS\nrts\n
Modify
Description
Get dhcp status
Example
jsr ch395_get_dhcp_status\n; Check A for dhcp status\nrts\n
Modify
Description
Get General interrupt Status
Modify
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
Description
Check interrupt socket status
Modify
Returns
Example
lda #CH395_SOCKET1 ; Check socket 1\njsr ch395_get_int_status_sn\n; Check interrupt type\nrts\n
"},{"location":"2024.1/assembly/#ch395_get_ip_inf","title":"ch395_get_ip_inf","text":"Description
Get ip info
Input
Modify
Description
Get mac address
Input
Modify
Returns
Accumulator : the content of ptr modified
X Register : the content of ptr modified
Description
Get physical status
Modify
Returns
Example
jsr ch395_get_phy_status\n; Check A physical status\nrts\n
"},{"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
Returns
Accumulator : The length
X Register : The length
Description
Get remote ip connected to the socket
Input
Modify
Description
Returns in A socket status (close/open ...)
Modify
Returns
Accumulator : The status
X Register : The state
Example
lda #$01 ; Socket 1\njsr ch395_get_socket_status_sn\n; check A and X for the state\n
"},{"location":"2024.1/assembly/#ch395_init","title":"ch395_init","text":"Description
Initialize ch395
Modify
Description
Open socket from arg
Input
Modify
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
Input
Modify
Example
lda #$FF\nldx #$FF\njsr ch395_retran_period\nrts\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":"Description
Set fun para
Input
Modify
Description
Set gateway ip addr
"},{"location":"2024.1/assembly/#ch395_set_ip_addr","title":"ch395_set_ip_addr","text":"Description
Set ip row
"},{"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":"Description
Set retran period
Input
Description
Send data to socketid
Input
Description
Checks if ch395 exists
"},{"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-socketid","title":"oid ch395_close_socket_sn(unsigned char socketid)","text":"Description
Close socket
Input
"},{"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
Input
"},{"location":"2024.1/c/#void-ch395_get_ip_infunsigned-char-ip_infos","title":"void ch395_get_ip_inf(unsigned char ip_infos[]);","text":"Description
Get ip info
"},{"location":"2024.1/c/#void-ch395_get_mac_adressunsigned-char-macaddress","title":"void ch395_get_mac_adress(unsigned char macaddress[]);","text":"Description
Get mac address
"},{"location":"2024.1/c/#unsigned-char-ch395_get_phy_status","title":"unsigned char ch395_get_phy_status();","text":"Description
Get physical 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
Input
"},{"location":"2024.1/c/#void-ch395_get_remot_ipp_snunsigned-char-ptr-unsigned-char-socket","title":"void ch395_get_remot_ipp_sn(unsigned char *ptr, unsigned char socket);","text":"Description
Get remote ip connected to the socket
Input
"},{"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":"Description
Returns in A socket status (close/open ... )
Input
"},{"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":"Input
"},{"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":"Input
"},{"location":"2024.1/c/#void-ch395_reset_all","title":"void ch395_reset_all()","text":"Description
Reset ch395
"},{"location":"2024.1/c/#void-ch395_retran_periodunsigned-int-period","title":"void ch395_retran_period(unsigned int period);","text":"Description
Retran period
"},{"location":"2024.1/c/#void-ch395_set_des_port_snunsigned-int-port-unsigned-char-id_socket","title":"void ch395_set_des_port_sn(unsigned int port, unsigned char ID_SOCKET);","text":"Input
"},{"location":"2024.1/c/#void-ch395_set_fun_paraunsigned-char-flag","title":"void ch395_set_fun_para(unsigned char flag)","text":"Description
Set fun para
Description
Set gateway ip addr
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":""},{"location":"2024.1/c/#void-ch395_set_ipraw_pro_snunsigned-char-id_socket","title":"void ch395_set_ipraw_pro_sn(unsigned char ID_SOCKET);","text":"Description
Set ipraw protocol on socket
Input
"},{"location":"2024.1/c/#void-ch395_set_mac_adressunsigned-char-macaddress","title":"void ch395_set_mac_adress(unsigned char macaddress[]);","text":""},{"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":"Input
"},{"location":"2024.1/c/#void-ch395_set_retran_countunsigned-int-period","title":"void ch395_set_retran_count(unsigned int period);","text":"Description
Set retran period
"},{"location":"2024.1/c/#void-ch395_set_sour_port_snunsigned-int-portunsigned-char-id_socket","title":"void ch395_set_sour_port_sn(unsigned int port,unsigned char ID_SOCKET)","text":"Description
Set source socket
Input
"},{"location":"2024.1/c/#void-ch395_tcp_connect_snunsigned-char-id_socket","title":"void ch395_tcp_connect_sn(unsigned char ID_SOCKET)","text":"Input
"},{"location":"2024.1/c/#void-ch395_tcp_disconnect_snunsigned-char-id_socket","title":"void ch395_tcp_disconnect_sn(unsigned char ID_SOCKET)","text":"Input
"},{"location":"2024.1/c/#void-ch395_tcp_listen_snunsigned-char-id_socket","title":"void ch395_tcp_listen_sn(unsigned char ID_SOCKET)","text":""},{"location":"2024.1/c/#void-ch395_write_send_buf_snunsigned-char-buffer-unsigned-int-lengthunsigned-char-id_socket","title":"void ch395_write_send_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET);","text":"Description
Send data to socketid
Input
"}]} \ No newline at end of file diff --git a/docs/api/sitemap.xml.gz b/docs/api/sitemap.xml.gz index 3b9bb64..d71eed7 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 24473ff..78d2cb7 100644 --- a/docs/code/2024.1/assembly.md +++ b/docs/code/2024.1/assembly.md @@ -24,7 +24,7 @@ ch395_connected: ***Returns*** -* Accumulator : Returns #AA if it exists +* Accumulator : Returns #CH395_DETECTED if it exists @@ -38,7 +38,7 @@ Clear receive buffer ***Example*** ```ca65 - lda #$01 ; Socket ID + lda #CH395_SOCKET1 ; Socket ID jsr ch395_clear_recv_buf_sn ``` @@ -55,6 +55,13 @@ Clear receive buffer Close socket +***Input*** + +* Accumulator : The id of the socket to close + +***Modify*** + +* Y Register ***Example*** @@ -63,13 +70,6 @@ Close socket jsr ch395_close_socket_sn ``` -***Input*** - -* Accumulator : The id of the socket to close - -***Modify*** - -* Y Register ## ch395_dhcp_enable @@ -511,8 +511,14 @@ Set retran period ## ch395_write_send_buf_sn +***Description*** + +Send data to socketid + ***Input*** * Accumulator : Socket ID +* Y Register : Low length +* X Register : High length diff --git a/docs/code/2024.1/c.md b/docs/code/2024.1/c.md index 7ab1310..316c77e 100644 --- a/docs/code/2024.1/c.md +++ b/docs/code/2024.1/c.md @@ -2,6 +2,10 @@ ## unsigned char ch395_check_exist(); +***Description*** + +Checks if ch395 exists + ## void ch395_clear_recv_buf_sn(unsigned char ID_SOCKET) @@ -12,12 +16,15 @@ Clear receive buffer -## oid ch395_close_socket_sn(unsigned char ID_SOCKET) +## oid ch395_close_socket_sn(unsigned char socketid) ***Description*** Close socket +***Input*** + + @@ -54,6 +61,9 @@ Get ch395 firmware version Check interrupt socket status +***Input*** + + ## void ch395_get_ip_inf(unsigned char ip_infos[]); @@ -86,6 +96,9 @@ Get physical status Get the length received from socket +***Input*** + + ## void ch395_get_remot_ipp_sn(unsigned char *ptr, unsigned char socket); @@ -94,6 +107,9 @@ Get the length received from socket Get remote ip connected to the socket +***Input*** + + ## unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET); @@ -102,6 +118,9 @@ Get remote ip connected to the socket Returns in A socket status (close/open ... ) +***Input*** + + ## void ch395_init(); @@ -114,10 +133,16 @@ Initialize ch395 ## void ch395_open_socket_sn(unsigned char ID_SOCKET) +***Input*** + + ## void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); +***Input*** + + ## void ch395_reset_all() @@ -138,6 +163,9 @@ Retran period ## void ch395_set_des_port_sn(unsigned int port, unsigned char ID_SOCKET); +***Input*** + + ## void ch395_set_fun_para(unsigned char flag) @@ -170,6 +198,9 @@ Set ip addr Set ipraw protocol on socket +***Input*** + + ## void ch395_set_mac_adress(unsigned char macaddress[]); @@ -178,6 +209,9 @@ Set ipraw protocol on socket ## void ch395_set_proto_type_sn(unsigned char proto,unsigned char ID_SOCKET) +***Input*** + + ## void ch395_set_retran_count(unsigned int period); @@ -190,21 +224,41 @@ Set retran period ## void ch395_set_sour_port_sn(unsigned int port,unsigned char ID_SOCKET) +***Description*** + +Set source socket + +***Input*** + + ## void ch395_tcp_connect_sn(unsigned char ID_SOCKET) +***Input*** + + ## void ch395_tcp_disconnect_sn(unsigned char ID_SOCKET) +***Input*** + + ## void ch395_tcp_listen_sn(unsigned char ID_SOCKET) -## +## void ch395_write_send_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); + +***Description*** + +Send data to socketid + +***Input*** + diff --git a/docs/code/assembly.md b/docs/code/assembly.md index 24473ff..78d2cb7 100644 --- a/docs/code/assembly.md +++ b/docs/code/assembly.md @@ -24,7 +24,7 @@ ch395_connected: ***Returns*** -* Accumulator : Returns #AA if it exists +* Accumulator : Returns #CH395_DETECTED if it exists @@ -38,7 +38,7 @@ Clear receive buffer ***Example*** ```ca65 - lda #$01 ; Socket ID + lda #CH395_SOCKET1 ; Socket ID jsr ch395_clear_recv_buf_sn ``` @@ -55,6 +55,13 @@ Clear receive buffer Close socket +***Input*** + +* Accumulator : The id of the socket to close + +***Modify*** + +* Y Register ***Example*** @@ -63,13 +70,6 @@ Close socket jsr ch395_close_socket_sn ``` -***Input*** - -* Accumulator : The id of the socket to close - -***Modify*** - -* Y Register ## ch395_dhcp_enable @@ -511,8 +511,14 @@ Set retran period ## ch395_write_send_buf_sn +***Description*** + +Send data to socketid + ***Input*** * Accumulator : Socket ID +* Y Register : Low length +* X Register : High length diff --git a/docs/code/c.md b/docs/code/c.md index 7ab1310..316c77e 100644 --- a/docs/code/c.md +++ b/docs/code/c.md @@ -2,6 +2,10 @@ ## unsigned char ch395_check_exist(); +***Description*** + +Checks if ch395 exists + ## void ch395_clear_recv_buf_sn(unsigned char ID_SOCKET) @@ -12,12 +16,15 @@ Clear receive buffer -## oid ch395_close_socket_sn(unsigned char ID_SOCKET) +## oid ch395_close_socket_sn(unsigned char socketid) ***Description*** Close socket +***Input*** + + @@ -54,6 +61,9 @@ Get ch395 firmware version Check interrupt socket status +***Input*** + + ## void ch395_get_ip_inf(unsigned char ip_infos[]); @@ -86,6 +96,9 @@ Get physical status Get the length received from socket +***Input*** + + ## void ch395_get_remot_ipp_sn(unsigned char *ptr, unsigned char socket); @@ -94,6 +107,9 @@ Get the length received from socket Get remote ip connected to the socket +***Input*** + + ## unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET); @@ -102,6 +118,9 @@ Get remote ip connected to the socket Returns in A socket status (close/open ... ) +***Input*** + + ## void ch395_init(); @@ -114,10 +133,16 @@ Initialize ch395 ## void ch395_open_socket_sn(unsigned char ID_SOCKET) +***Input*** + + ## void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); +***Input*** + + ## void ch395_reset_all() @@ -138,6 +163,9 @@ Retran period ## void ch395_set_des_port_sn(unsigned int port, unsigned char ID_SOCKET); +***Input*** + + ## void ch395_set_fun_para(unsigned char flag) @@ -170,6 +198,9 @@ Set ip addr Set ipraw protocol on socket +***Input*** + + ## void ch395_set_mac_adress(unsigned char macaddress[]); @@ -178,6 +209,9 @@ Set ipraw protocol on socket ## void ch395_set_proto_type_sn(unsigned char proto,unsigned char ID_SOCKET) +***Input*** + + ## void ch395_set_retran_count(unsigned int period); @@ -190,21 +224,41 @@ Set retran period ## void ch395_set_sour_port_sn(unsigned int port,unsigned char ID_SOCKET) +***Description*** + +Set source socket + +***Input*** + + ## void ch395_tcp_connect_sn(unsigned char ID_SOCKET) +***Input*** + + ## void ch395_tcp_disconnect_sn(unsigned char ID_SOCKET) +***Input*** + + ## void ch395_tcp_listen_sn(unsigned char ID_SOCKET) -## +## void ch395_write_send_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); + +***Description*** + +Send data to socketid + +***Input*** + diff --git a/src/6502/_ch395_check_exist.s b/src/6502/_ch395_check_exist.s index 84f9a5d..ab1009f 100644 --- a/src/6502/_ch395_check_exist.s +++ b/src/6502/_ch395_check_exist.s @@ -7,6 +7,7 @@ .proc _ch395_check_exist ;;@proto unsigned char ch395_check_exist(); + ;;@brief Checks if ch395 exists ;;@```c ;;@` val = ch395_get_glob_int_status(); ;;@` if (val == CH395_DETECTED) printf("Ch395 is here"); @@ -23,7 +24,7 @@ ;;@`ch395_connected: ;;@``` ;;@modifyA - ;;@returnsA Returns #AA if it exists + ;;@returnsA Returns #CH395_DETECTED if it exists lda #CH395_CHECK_EXIST sta CH395_COMMAND_PORT lda #$55 diff --git a/src/6502/_ch395_clear_recv_buf_sn.s b/src/6502/_ch395_clear_recv_buf_sn.s index 58bc588..23a8db6 100644 --- a/src/6502/_ch395_clear_recv_buf_sn.s +++ b/src/6502/_ch395_clear_recv_buf_sn.s @@ -9,7 +9,7 @@ ;;@proto void ch395_clear_recv_buf_sn(unsigned char ID_SOCKET) ;;@brief Clear receive buffer ;;@```c - ;;@` ch395_clear_recv_buf_sn(1); + ;;@` ch395_clear_recv_buf_sn(CH395_SOCKET1); ;;@``` .endproc @@ -17,7 +17,7 @@ .proc ch395_clear_recv_buf_sn ;;@brief Clear receive buffer ;;@```ca65 - ;;@` lda #$01 ; Socket ID + ;;@` lda #CH395_SOCKET1 ; Socket ID ;;@` jsr ch395_clear_recv_buf_sn ;;@``` ;;@modifyA diff --git a/src/6502/_ch395_close_socket_sn.s b/src/6502/_ch395_close_socket_sn.s index 872fb44..2033b79 100644 --- a/src/6502/_ch395_close_socket_sn.s +++ b/src/6502/_ch395_close_socket_sn.s @@ -6,19 +6,23 @@ .export ch395_close_socket_sn .proc _ch395_close_socket_sn - ;;@proto oid ch395_close_socket_sn(unsigned char ID_SOCKET) + ;;@proto oid ch395_close_socket_sn(unsigned char socketid) ;;@brief Close socket + ;;@inputPARAM_socketid The socketid + ;;@```c + ;;@` ch395_close_socket_sn(CH395_SOCKET1); + ;;@``` .endproc .proc ch395_close_socket_sn ;;@brief Close socket + ;;@inputA The id of the socket to close + ;;@modifyY ;;@```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 sta CH395_DATA_PORT ; Send socket id diff --git a/src/6502/_ch395_get_int_status_sn.s b/src/6502/_ch395_get_int_status_sn.s index fca3b33..928942a 100644 --- a/src/6502/_ch395_get_int_status_sn.s +++ b/src/6502/_ch395_get_int_status_sn.s @@ -8,6 +8,7 @@ .proc _ch395_get_int_status_sn ;;@proto unsigned char ch395_get_int_status_sn(unsigned char ID_SOCKET); ;;@brief Check interrupt socket status + ;;@inputPARAM_socketid The socketid ;;@```c ;;@`#include "ch395.h" ;;@`... diff --git a/src/6502/_ch395_get_recv_len_sn.s b/src/6502/_ch395_get_recv_len_sn.s index e0aec5c..40b6e4e 100644 --- a/src/6502/_ch395_get_recv_len_sn.s +++ b/src/6502/_ch395_get_recv_len_sn.s @@ -8,6 +8,7 @@ .proc _ch395_get_recv_len_sn ;;@proto void ch395_get_recv_len_sn(unsigned char ID_SOCKET) ;;@brief Get the length received from socket + ;;@inputPARAM_socketid The socketid ;;@```c ;;@` length_received = ch395_get_recv_len_sn(1); ;;@``` diff --git a/src/6502/_ch395_get_remot_ipp_sn.s b/src/6502/_ch395_get_remot_ipp_sn.s index 1fb5ddb..4638cdb 100644 --- a/src/6502/_ch395_get_remot_ipp_sn.s +++ b/src/6502/_ch395_get_remot_ipp_sn.s @@ -45,7 +45,7 @@ enter_c_proto: .proc _ch395_get_remot_ipp_sn ;;@proto void ch395_get_remot_ipp_sn(unsigned char *ptr, unsigned char socket); ;;@brief Get remote ip connected to the socket - + ;;@inputPARAM_socketid The socketid pha jsr popax sta ptr1 diff --git a/src/6502/_ch395_get_socket_status_sn.s b/src/6502/_ch395_get_socket_status_sn.s index 41a2282..3b2c54c 100644 --- a/src/6502/_ch395_get_socket_status_sn.s +++ b/src/6502/_ch395_get_socket_status_sn.s @@ -9,6 +9,7 @@ .proc _ch395_get_socket_status_sn ;;@proto unsigned int ch395_get_socket_status_sn(unsigned char ID_SOCKET); ;;@brief Returns in A socket status (close/open ... ) + ;;@inputPARAM_socketid The socketid .endproc .proc ch395_get_socket_status_sn diff --git a/src/6502/_ch395_open_socket_sn.s b/src/6502/_ch395_open_socket_sn.s index 20f5c43..a453e02 100644 --- a/src/6502/_ch395_open_socket_sn.s +++ b/src/6502/_ch395_open_socket_sn.s @@ -7,6 +7,7 @@ .proc _ch395_open_socket_sn ;;@proto void ch395_open_socket_sn(unsigned char ID_SOCKET) + ;;@inputPARAM_socketid The socketid .endproc .proc ch395_open_socket_sn diff --git a/src/6502/_ch395_read_recv_buf_sn.s b/src/6502/_ch395_read_recv_buf_sn.s index 5a9f711..a73d55b 100644 --- a/src/6502/_ch395_read_recv_buf_sn.s +++ b/src/6502/_ch395_read_recv_buf_sn.s @@ -13,6 +13,7 @@ .proc _ch395_read_recv_buf_sn ;;@proto void ch395_read_recv_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); + ;;@inputPARAM_socketid The socketid .endproc .proc ch395_read_recv_buf_sn diff --git a/src/6502/_ch395_set_des_port_sn.s b/src/6502/_ch395_set_des_port_sn.s index 03e8efb..3a464ba 100644 --- a/src/6502/_ch395_set_des_port_sn.s +++ b/src/6502/_ch395_set_des_port_sn.s @@ -2,26 +2,13 @@ .include "ch395.inc" .endif - +.importzp ptr1 .import popax .export _ch395_set_des_port_sn .export ch395_set_des_port_sn - -.proc _ch395_set_des_port_sn - ;;@proto void ch395_set_des_port_sn(unsigned int port, unsigned char ID_SOCKET); - pha - jsr popax ; get port - sta ptr1 - stx ptr1+1 - pla - - jmp ch395_set_des_port_sn::entry_point_c - -.endproc - .proc ch395_set_des_port_sn sty ptr1 stx ptr1+1 @@ -38,3 +25,16 @@ entry_point_c: rts .endproc + +.proc _ch395_set_des_port_sn + ;;@proto void ch395_set_des_port_sn(unsigned int port, unsigned char ID_SOCKET); + ;;@inputPARAM_socketid The socketid + pha + jsr popax ; get port + sta ptr1 + stx ptr1+1 + pla + + jmp ch395_set_des_port_sn::entry_point_c + +.endproc diff --git a/src/6502/_ch395_set_ip_addr_sn.s b/src/6502/_ch395_set_ip_addr_sn.s index cc6cf34..556cfa7 100644 --- a/src/6502/_ch395_set_ip_addr_sn.s +++ b/src/6502/_ch395_set_ip_addr_sn.s @@ -13,16 +13,6 @@ .export _ch395_set_ip_addr_sn .export ch395_set_ip_addr_sn -.proc _ch395_set_ip_addr_sn - ;;@proto void ch395_set_ip_addr_sn(unsigned char ip_addr[], unsigned char ID_SOCKET) - pha - jsr popax ; get ip_addr - sta ptr1 - stx ptr1+1 - pla - jmp ch395_set_ip_addr_sn::entry_point_c -.endproc - .proc ch395_set_ip_addr_sn ;;@brief Set Socket Ip address to connect with @@ -45,3 +35,14 @@ entry_point_c: rts .endproc + +.proc _ch395_set_ip_addr_sn + ;;@proto void ch395_set_ip_addr_sn(unsigned char ip_addr[], unsigned char ID_SOCKET) + ;;@bried Set ip addr socket + pha + jsr popax ; get ip_addr + sta ptr1 + stx ptr1+1 + pla + jmp ch395_set_ip_addr_sn::entry_point_c +.endproc diff --git a/src/6502/_ch395_set_ipraw_pro_sn.s b/src/6502/_ch395_set_ipraw_pro_sn.s index 3814af6..7f5e116 100644 --- a/src/6502/_ch395_set_ipraw_pro_sn.s +++ b/src/6502/_ch395_set_ipraw_pro_sn.s @@ -8,6 +8,7 @@ .proc _ch395_set_ipraw_pro_sn ;;@proto void ch395_set_ipraw_pro_sn(unsigned char ID_SOCKET); ;;@brief Set ipraw protocol on socket + ;;@inputPARAM_socketid The socketid .endproc .proc ch395_set_ipraw_pro_sn diff --git a/src/6502/_ch395_set_proto_type_sn.s b/src/6502/_ch395_set_proto_type_sn.s index 63c11cd..5deb8d8 100644 --- a/src/6502/_ch395_set_proto_type_sn.s +++ b/src/6502/_ch395_set_proto_type_sn.s @@ -9,8 +9,11 @@ .proc _ch395_set_proto_type_sn ;;@proto void ch395_set_proto_type_sn(unsigned char proto,unsigned char ID_SOCKET) + ;;@inputPARAM_socketid The socketid + pha jsr popa - sta CH395_DATA_PORT ; tcp mode + tax + pla .endproc .proc ch395_set_proto_type_sn diff --git a/src/6502/_ch395_set_sour_port_sn.s b/src/6502/_ch395_set_sour_port_sn.s index 6e93e75..1751193 100644 --- a/src/6502/_ch395_set_sour_port_sn.s +++ b/src/6502/_ch395_set_sour_port_sn.s @@ -2,19 +2,25 @@ .include "ch395.inc" .endif -.ifndef FROM_ASSEMBLY - .import popax -.endif +.import popax + .export _ch395_set_sour_port_sn .export ch395_set_sour_port_sn .proc _ch395_set_sour_port_sn ;;@proto void ch395_set_sour_port_sn(unsigned int port,unsigned char ID_SOCKET) - - + ;;@brief Set source socket + ;;@inputPARAM_socketid The socketid + ;;@```c + ;;@` ch395_set_sour_port_sn(50000,1); + ;;@` + ;;@``` + pha jsr popax ; get port - + tay + pla + ; Follow .endproc .proc ch395_set_sour_port_sn diff --git a/src/6502/_ch395_tcp_connect_sn.s b/src/6502/_ch395_tcp_connect_sn.s index bc166bf..2377919 100644 --- a/src/6502/_ch395_tcp_connect_sn.s +++ b/src/6502/_ch395_tcp_connect_sn.s @@ -7,6 +7,7 @@ .proc _ch395_tcp_connect_sn ;;@proto void ch395_tcp_connect_sn(unsigned char ID_SOCKET) + ;;@inputPARAM_socketid The socketid .endproc .proc ch395_tcp_connect_sn diff --git a/src/6502/_ch395_tcp_disconnect_sn.s b/src/6502/_ch395_tcp_disconnect_sn.s index e6ddec6..7cc20da 100644 --- a/src/6502/_ch395_tcp_disconnect_sn.s +++ b/src/6502/_ch395_tcp_disconnect_sn.s @@ -7,6 +7,7 @@ .proc _ch395_tcp_disconnect_sn ;;@proto void ch395_tcp_disconnect_sn(unsigned char ID_SOCKET) + ;;@inputPARAM_socketid The socketid .endproc .proc ch395_tcp_disconnect_sn diff --git a/src/6502/_ch395_write_send_buf_sn.s b/src/6502/_ch395_write_send_buf_sn.s index 28a9169..4c7c303 100644 --- a/src/6502/_ch395_write_send_buf_sn.s +++ b/src/6502/_ch395_write_send_buf_sn.s @@ -10,7 +10,9 @@ .export ch395_write_send_buf_sn .proc _ch395_write_send_buf_sn - ;;@proto + ;;@proto void ch395_write_send_buf_sn(unsigned char *buffer, unsigned int length,unsigned char ID_SOCKET); + ;;@brief Send data to socketid + ;;@inputPARAM_socketid The socketid jsr popax sta length stx length+1 @@ -21,7 +23,10 @@ .endproc .proc ch395_write_send_buf_sn + ;;@brief Send data to socketid ;;@inputA Socket ID + ;;@inputY Low length + ;;@inputX High length sty ptr2 ; Length stx ptr2+1