4 #include <h8s2638h.h>
\r
5 #include <system_def.h>
\r
6 #include <periph/sci_rs232.h>
\r
13 #include "hci_error.h"
\r
17 * chyby generovane bth zarizenim
\r
23 } status_command[] = {
\r
24 { 0x00, "Status OK" },
\r
25 { 0x01, "Unknown HCI Command" },
\r
26 { 0x02, "No Connection" },
\r
27 { 0x03, "Hardware Failure" },
\r
28 { 0x04, "Page Timeout" },
\r
29 { 0x05, "Authentication Failure" },
\r
30 { 0x06, "Key Missing" },
\r
31 { 0x07, "Memory Full" },
\r
32 { 0x08, "Connection Timeout" },
\r
33 { 0x09, "Max Number Of Connections" },
\r
34 { 0x0A, "Max Number Of SCO Connections To A Device"},
\r
35 { 0x0B, "ACL connection already exists" },
\r
36 { 0x0C, "Command Disallowed" },
\r
37 { 0x0D, "Host Rejected due to limited resources" },
\r
38 { 0x0E, "Host Rejected due to security reasons" },
\r
39 { 0x0F, "Host Rejected due to remote device is only a personal device" },
\r
40 { 0x10, "Host Timeout" },
\r
41 { 0x11, "Unsupported Feature or Parameter Value" },
\r
42 { 0x12, "Invalid HCI Command Parameters" },
\r
43 { 0x13, "Other End Terminated Connection: User Ended Connection" },
\r
44 { 0x14, "Other End Terminated Connection: Low Resources" },
\r
45 { 0x15, "Other End Terminated Connection: About to Power Off" },
\r
46 { 0x16, "Connection Terminated by Local Host" },
\r
47 { 0x17, "Repeated Attempts" },
\r
51 * vypis chyby na terminal pres RS232
\r
53 void bth_error_detect_status(uint8_t status_num)
\r
57 if(status_num<sizeof(status_command));
\r
59 message=status_command[status_num].error_doc;
\r
60 while(*(message+i)!=0)
\r
63 sci_rs232_sendch(*(message+i),sci_rs232_chan_default); //do PC
\r
72 * chyby programu - nutno upravit navratove parametry - sedi jenom 0 a 3
\r
77 }event_command[] = {
\r
78 { 0x00, "Status OK" },
\r
79 { 0x01, "nespecifikovana chyba" },
\r
80 { 0x02, "potvrzovaci fronta prazdna" },
\r
81 { 0x03, "fce nenapsana" },
\r
87 * vypis chyby na terminal pres RS232
\r
89 void bth_error_detect_event(uint8_t status_num)
\r
93 if(status_num<sizeof(event_command));
\r
95 message=event_command[status_num].error_doc;
\r
96 while(*(message+i)!=0)
\r
99 sci_rs232_sendch(*(message+i),sci_rs232_chan_default); //do PC
\r