|
38 | 38 |
|
39 | 39 | /** \brief default configuration for an ECCx08A device */ |
40 | 40 | ATCAIfaceCfg cfg_ateccx08a_i2c_default = { |
41 | | - .iface_type = ATCA_I2C_IFACE, |
42 | | - .devtype = ATECC508A, |
43 | | - .atcai2c.slave_address = 0xC0, |
44 | | - .atcai2c.bus = 2, |
45 | | - .atcai2c.baud = 400000, |
46 | | - //.atcai2c.baud = 100000, |
47 | | - .wake_delay = 1500, |
48 | | - .rx_retries = 20 |
| 41 | + .iface_type = ATCA_I2C_IFACE, |
| 42 | + .devtype = ATECC608A, |
| 43 | + { |
| 44 | + .atcai2c.slave_address = 0xC0, |
| 45 | + .atcai2c.bus = 2, |
| 46 | + .atcai2c.baud = 400000, |
| 47 | + //.atcai2c.baud = 100000, |
| 48 | + }, |
| 49 | + .wake_delay = 1500, |
| 50 | + .rx_retries = 20 |
49 | 51 | }; |
50 | 52 |
|
51 | 53 | /** \brief default configuration for an ECCx08A device on the logical SWI bus over UART*/ |
52 | 54 | ATCAIfaceCfg cfg_ateccx08a_swi_default = { |
53 | | - .iface_type = ATCA_SWI_IFACE, |
54 | | - .devtype = ATECC508A, |
55 | | - .atcaswi.bus = 4, |
56 | | - .wake_delay = 1500, |
57 | | - .rx_retries = 10 |
| 55 | + .iface_type = ATCA_SWI_IFACE, |
| 56 | + .devtype = ATECC608A, |
| 57 | + { |
| 58 | + .atcaswi.bus = 4, |
| 59 | + }, |
| 60 | + .wake_delay = 1500, |
| 61 | + .rx_retries = 10 |
58 | 62 | }; |
59 | 63 |
|
60 | 64 | /** \brief default configuration for Kit protocol over the device's async interface */ |
61 | 65 | ATCAIfaceCfg cfg_ateccx08a_kitcdc_default = { |
62 | | - .iface_type = ATCA_UART_IFACE, |
63 | | - .devtype = ATECC508A, |
64 | | - .atcauart.port = 0, |
65 | | - .atcauart.baud = 115200, |
66 | | - .atcauart.wordsize = 8, |
67 | | - .atcauart.parity = 2, |
68 | | - .atcauart.stopbits = 1, |
69 | | - .rx_retries = 1, |
| 66 | + .iface_type = ATCA_UART_IFACE, |
| 67 | + .devtype = ATECC608A, |
| 68 | + { |
| 69 | + .atcauart.port = 0, |
| 70 | + .atcauart.baud = 115200, |
| 71 | + .atcauart.wordsize = 8, |
| 72 | + .atcauart.parity = 2, |
| 73 | + .atcauart.stopbits = 1, |
| 74 | + }, |
| 75 | + .rx_retries = 1, |
70 | 76 | }; |
71 | 77 |
|
72 | 78 | /** \brief default configuration for Kit protocol over the device's async interface */ |
73 | 79 | ATCAIfaceCfg cfg_ateccx08a_kithid_default = { |
74 | | - .iface_type = ATCA_HID_IFACE, |
75 | | - .devtype = ATECC508A, |
76 | | - .atcahid.idx = 0, |
77 | | - .atcahid.vid = 0x03EB, |
78 | | - .atcahid.pid = 0x2312, |
79 | | - .atcahid.packetsize = 64, |
80 | | - .atcahid.guid = { 0x4d, 0x1e, 0x55, 0xb2, 0xf1, 0x6f, 0x11, 0xcf, 0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 }, |
| 80 | + .iface_type = ATCA_HID_IFACE, |
| 81 | + .devtype = ATECC608A, |
| 82 | + { |
| 83 | + .atcahid.dev_interface = ATCA_KIT_AUTO_IFACE, |
| 84 | + .atcahid.dev_identity = 0, |
| 85 | + .atcahid.idx = 0, |
| 86 | + .atcahid.vid = 0x03EB, |
| 87 | + .atcahid.pid = 0x2312, |
| 88 | + .atcahid.packetsize = 64, |
| 89 | + } |
81 | 90 | }; |
82 | 91 |
|
| 92 | + |
83 | 93 | /** \brief default configuration for a SHA204A device on the first logical I2C bus */ |
84 | 94 | ATCAIfaceCfg cfg_atsha204a_i2c_default = { |
85 | | - .iface_type = ATCA_I2C_IFACE, |
86 | | - .devtype = ATSHA204A, |
87 | | - .atcai2c.slave_address = 0xC8, |
88 | | - .atcai2c.bus = 2, |
89 | | - .atcai2c.baud = 400000, |
90 | | - .wake_delay = 2560, |
91 | | - .rx_retries = 20 |
| 95 | + .iface_type = ATCA_I2C_IFACE, |
| 96 | + .devtype = ATSHA204A, |
| 97 | + { |
| 98 | + .atcai2c.slave_address = 0xC8, |
| 99 | + .atcai2c.bus = 2, |
| 100 | + .atcai2c.baud = 400000, |
| 101 | + }, |
| 102 | + .wake_delay = 2560, |
| 103 | + .rx_retries = 20 |
92 | 104 | }; |
93 | 105 |
|
94 | 106 | /** \brief default configuration for an SHA204A device on the logical SWI bus over UART*/ |
95 | 107 | ATCAIfaceCfg cfg_atsha204a_swi_default = { |
96 | | - .iface_type = ATCA_SWI_IFACE, |
97 | | - .devtype = ATSHA204A, |
98 | | - .atcaswi.bus = 4, |
99 | | - .wake_delay = 2560, |
100 | | - .rx_retries = 10 |
| 108 | + .iface_type = ATCA_SWI_IFACE, |
| 109 | + .devtype = ATSHA204A, |
| 110 | + { |
| 111 | + .atcaswi.bus = 4, |
| 112 | + }, |
| 113 | + .wake_delay = 2560, |
| 114 | + .rx_retries = 10 |
101 | 115 | }; |
102 | 116 |
|
103 | 117 | /** \brief default configuration for Kit protocol over the device's async interface */ |
104 | 118 | ATCAIfaceCfg cfg_atsha204a_kitcdc_default = { |
105 | | - .iface_type = ATCA_UART_IFACE, |
106 | | - .devtype = ATSHA204A, |
107 | | - .atcauart.port = 0, |
108 | | - .atcauart.baud = 115200, |
109 | | - .atcauart.wordsize = 8, |
110 | | - .atcauart.parity = 2, |
111 | | - .atcauart.stopbits = 1, |
112 | | - .rx_retries = 1, |
| 119 | + .iface_type = ATCA_UART_IFACE, |
| 120 | + .devtype = ATSHA204A, |
| 121 | + { |
| 122 | + .atcauart.port = 0, |
| 123 | + .atcauart.baud = 115200, |
| 124 | + .atcauart.wordsize = 8, |
| 125 | + .atcauart.parity = 2, |
| 126 | + .atcauart.stopbits = 1, |
| 127 | + }, |
| 128 | + .rx_retries = 1, |
113 | 129 | }; |
114 | 130 |
|
115 | 131 | /** \brief default configuration for Kit protocol over the device's async interface */ |
116 | 132 | ATCAIfaceCfg cfg_atsha204a_kithid_default = { |
117 | | - .iface_type = ATCA_HID_IFACE, |
118 | | - .devtype = ATSHA204A, |
119 | | - .atcahid.idx = 0, |
120 | | - .atcahid.vid = 0x03EB, |
121 | | - .atcahid.pid = 0x2312, |
122 | | - .atcahid.packetsize = 64, |
123 | | - .atcahid.guid = { 0x4d, 0x1e, 0x55, 0xb2, 0xf1, 0x6f, 0x11, 0xcf, 0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 }, |
| 133 | + .iface_type = ATCA_HID_IFACE, |
| 134 | + .devtype = ATSHA204A, |
| 135 | + .atcahid.dev_interface = ATCA_KIT_AUTO_IFACE, |
| 136 | + .atcahid.dev_identity = 0, |
| 137 | + .atcahid.idx = 0, |
| 138 | + .atcahid.vid = 0x03EB, |
| 139 | + .atcahid.pid = 0x2312, |
| 140 | + .atcahid.packetsize = 64, |
124 | 141 | }; |
125 | 142 |
|
126 | 143 | /** @} */ |
0 commit comments