From: patrick-scho Date: Mon, 28 Apr 2025 09:31:40 +0000 (+0200) Subject: update code block to include 'c' specifier X-Git-Url: https://gitweb.ps.run/matrix_esp_thesis/commitdiff_plain/c86eeb6e2a53dfdfb9c205f07d5913c27178ff7e?hp=ee50fbf1bedef4702a177c2e4e0ef326ba548ae2 update code block to include 'c' specifier --- diff --git a/Readme.md b/Readme.md index 9e90f9a..81b3c2f 100644 --- a/Readme.md +++ b/Readme.md @@ -32,7 +32,7 @@ There are currently two, SendEncrypted and Verify. The example can be set in `esp32/esp_project(_risc_v)/main/CMakeLists.txt` as the second argument after SRCS. Any code using the library should compile under ESP-IDF if the following code is added at the end of the file: -``` +```c #include "wifi.h" void @@ -61,7 +61,7 @@ To use the library in an ESP-IDF project: ## Examples ### (De)Initialization -``` +```c MatrixClient * client = (MatrixClient*)malloc(sizeof(MatrixClient)); MatrixClientInit(client); @@ -79,14 +79,14 @@ MatrixHttpDeinit(&client->hc); ``` ### Uploading keys -``` +```c MatrixClientGenerateOnetimeKeys(client, 10); MatrixClientUploadOnetimeKeys(client); MatrixClientUploadDeviceKeys(client); ``` ### Sending an encrypted message -``` +```c MatrixMegolmOutSession * megolmOutSession; MatrixClientNewMegolmOutSession(&client, ROOM_ID, @@ -104,7 +104,7 @@ MatrixClientSendEventEncrypted(&client, ``` ### Verification -``` +```c // Request an encrypted event to enable verification STATIC char eventBuffer[1024]; MatrixClientGetRoomEvent(client, @@ -119,4 +119,4 @@ STATIC char nextBatch[1024]; while (! client->verified) { MatrixClientSync(client, syncBuffer, SYNC_BUFFER_SIZE, nextBatch, 1024); } -``` \ No newline at end of file +```