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 + + +
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
Description
Close socket
+Description
+Get dhcp status
Description
Get General interrupt Status
+Description
Get ch395 firmware version
Description
+Check interrupt socket status
Description
Get the length received from socket
Description
+Initialize ch395
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 +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
Description
Close socket
+Description
+Get dhcp status
Description
Get General interrupt Status
+Description
Get ch395 firmware version
Description
+Check interrupt socket status
Description
Get the length received from socket
Description
+Initialize ch395
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
Returns
Description
Clear receive buffer
Modify
Description
Close socket
Input
Modify
Description
Enable or not dhcp
Input
Modify
Description
Get cmd status
Modify
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
Modify
Modify
Modify
Modify
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
Modify
Description
Returns in A socket status (close/open)
Modify
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
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
Modify
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
Returns
Description
Clear receive buffer
Modify
Description
Close socket
Input
Modify
Description
Enable or not dhcp
Input
Modify
Description
Get cmd status
Modify
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
Modify
Modify
Modify
Modify
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
Modify
Description
Returns in A socket status (close/open)
Modify
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
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
Modify
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
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
Example
lda #CH395_SOCKET1 ; Check socket 1\njsr ch395_get_int_status_sn\n; Check interrupt type\nrts\n
Modify
Returns
Modify
Modify
Modify
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
Modify
Description
Returns in A socket status (close/open)
Modify
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
Example
lda #$FF\nldx #$FF\njsr ch395_retran_period\nrts\n
Input
Modify
Input
Modify
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
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
Example
lda #CH395_SOCKET1 ; Check socket 1\njsr ch395_get_int_status_sn\n; Check interrupt type\nrts\n
Modify
Returns
Modify
Modify
Modify
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
Modify
Description
Returns in A socket status (close/open)
Modify
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
Example
lda #$FF\nldx #$FF\njsr ch395_retran_period\nrts\n
Input
Modify
Input
Modify
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