Skip to content

Commit

Permalink
firmware: golioth_client_config is struct, not typdef
Browse files Browse the repository at this point in the history
Update to use `struct golioth_client_config` to match changes to SDK made in
golioth/golioth-firmware-sdk@c3a1c06

Signed-off-by: Mike Szczys <[email protected]>
  • Loading branch information
szczys committed Feb 10, 2025
1 parent 09850c9 commit 2137cc8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int main(void) {
size_t tls_client_crt_len = sizeof_your_crt_der_byte_array;
size_t tls_client_key_len = sizeof_your_key_der_byte_array;

golioth_client_config_t client_config = {
struct golioth_client_config client_config = {
.credentials = {
.auth_type = GOLIOTH_TLS_AUTH_TYPE_PKI,
.pki = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ uint8_t* client_psk = pointer_to_your_psk_array;
size_t client_psk_id_len = strlen_of_your_psk_id_array;
size_t client_psk_len = strlen_of_your_psk_array;

golioth_client_config_t client_config = {
struct golioth_client_config client_config = {
.credentials = {
.auth_type = GOLIOTH_TLS_AUTH_TYPE_PSK,
.psk = {
Expand Down
4 changes: 2 additions & 2 deletions docs/firmware/golioth-firmware-sdk/golioth-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ authentication:
const char* golioth_psk_id = "device@project";
const char* golioth_psk = "supersecret";

golioth_client_config_t client_config = {
struct golioth_client_config client_config = {
.credentials = {
.auth_type = GOLIOTH_TLS_AUTH_TYPE_PSK,
.psk = {
Expand All @@ -47,7 +47,7 @@ parameter.

```c
int main(void) {
client = golioth_client_create(client_config);
client = golioth_client_create(&client_config);
```
## Registering a Callback Function
Expand Down

0 comments on commit 2137cc8

Please sign in to comment.