Skip to content

Commit 340099c

Browse files
committed
Fix code style issues and fix typos in diagrams
1 parent 0b9cd60 commit 340099c

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

docs/design-documents/platform/crash-reporting/crash_reporting.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ In order to implement the callback the user can override the default callback fu
178178
```C
179179
mbed_error_ctx my_error_ctx;
180180
//Callback during reboot
181-
void mbed_error_reboot_callback(mbed_error_ctx *error_context) {
181+
void mbed_error_reboot_callback(mbed_error_ctx *error_context)
182+
{
182183
printf("Error callback received");
183184
//Copy the error context in a local struct for processing it later
184185
memcpy(&my_error_ctx, error_context, sizeof(mbed_error_ctx));
@@ -195,17 +196,18 @@ mbed_error_ctx error_ctx;
195196
int reboot_error_detected = 0;
196197

197198
//Callback during reboot
198-
void mbed_error_reboot_callback(mbed_error_ctx *error_context) {
199+
void mbed_error_reboot_callback(mbed_error_ctx *error_context)
200+
{
199201
printf("error callback received");
200202
reboot_error_detected = 1;
201203
}
202204

203205
// main() runs in its own thread in the OS
204-
int main() {
205-
206-
if(reboot_error_detected == 1) {
207-
if(MBED_SUCCESS == mbed_get_reboot_error_info(&error_ctx)) {
208-
printf("\nSuccessfully read error context\n");
206+
int main()
207+
{
208+
if (reboot_error_detected == 1) {
209+
if (MBED_SUCCESS == mbed_get_reboot_error_info(&error_ctx)) {
210+
printf("\nSuccessfully read error context\n");
209211
}
210212
//main continues...
211213
}
@@ -222,19 +224,20 @@ mbed_fault_context_t fault_ctx;
222224
int reboot_error_detected = 0;
223225
224226
//Callback during reboot
225-
void mbed_error_reboot_callback(mbed_error_ctx *error_context) {
227+
void mbed_error_reboot_callback(mbed_error_ctx * error_context)
228+
{
226229
printf("error callback received");
227230
reboot_error_detected = 1;
228231
}
229232
230233
// main() runs in its own thread in the OS
231-
int main() {
232-
233-
if(reboot_error_detected == 1) {
234-
if(MBED_SUCCESS == mbed_get_reboot_error_info(&error_ctx)) {
234+
int main()
235+
{
236+
if (reboot_error_detected == 1) {
237+
if (MBED_SUCCESS == mbed_get_reboot_error_info(&error_ctx)) {
235238
printf("\nRead in reboot info\n");
236-
if(error_ctx.error_status == MBED_ERROR_HARDFAULT_EXCEPTION) {
237-
if(MBED_SUCCESS == mbed_get_reboot_fault_context(&fault_ctx)) {
239+
if (error_ctx.error_status == MBED_ERROR_HARDFAULT_EXCEPTION) {
240+
if (MBED_SUCCESS == mbed_get_reboot_fault_context(&fault_ctx)) {
238241
printf("\nRead in fault context info\n");
239242
}
240243
}
51 Bytes
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<mxfile userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" version="9.3.1" editor="www.draw.io" type="device"><diagram id="58887138-f8ca-3a51-ea37-682e74172fa5" name="Page-1">3Vvbbts4EP0aA+lDAutq5dFJ03axW7RIim37tKAkSuaWFrUUndj9+uVVN8qJ4tiumwBNxSHFy5zhzOFQmXjXy/V7CsrFR5JCPHGn6XrivZ24rjsNI/6fkGyUxJnOZkqSU5RqWSO4Qz+haailK5TCqtOQEYIZKrvChBQFTFhHBiglD91mGcHdUUuQQ0twlwBsS7+ilC2UNAqmjfwDRPnCjOxMdU0Mkh85JatCjzdxvUz+qOolMH3p9tUCpOShJfJuJt41JYSpp+X6GmKhXKM29d67LbX1vCks2JgXXPXCPcArvfR3YIUZF92sE1gyRIqJG3KBdxVT/pSLpy8U5TmkMNVrYBujN945h4gXrh4WiMG7EiSi5oGbCZct2BLzksMfM4TxNcGEyve8LEpgknB5xSj5AVs1cRT4XO3elb0yvdh7SBlct0R6pe8hWUJGN7yJrvVmoXrFmGXgq/JDg7ETamQWLXx9LQParPK660a1/EFrd1jTnqXpjzFMzz/d2fq94RbMC9MPoEgxpHYDS+/S4qAYafps3acARtmg7sMkgnF2GN17TnA83fsDV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EUmmc/9PflWv5us90PH9q3ugC25+7g/sc/RW7POfxSIIa6nny1YXlW+OTjqzVU4wsG1rkkqmC/5Utt3JLsGvcdz1dUClGLADMO17l6MpK9cFNUAlLXK/TuuLHOH77jSMBYETfZnbt+daGygNbZ6wjzW6QXIcOcsuNszzT4h3uKXOWBg02qm/d4jRzCnO46O6I0Rqx53dfpGrwNOP0X3k6HMmXDm59ody/zXlpSJ6Yc75cLKZhjB37yjFDCRD2QL8ZsXwHBMqWVDHXKxnG9XepQlIHHNJ5Nx5yYVF4Kl8J9FXJXdOf4Gy5FZxBdP+DURgCD0uwRg6HDlHCgMBXYWa16WmC9dXzDfFGqy5xPxkRMqzgayuq8g9oemfIzYH7jbqXCt1C4MKcx0ir0S35ckE/Xtivgqre8PslWR6LdQcc9VmA4h9goxDC6PyN+CMZ+57Hx5vDMhMqZ1KoSoB9Fs1xRvnxDNDpd6CMYw81/3WYBBuIO6c9qoR78B6jML9S+SMZo0bsvfTlEl5sD/tXxt46ElYyu5BjNCRTIDg428FX1A8gr26838T/E6YxTFKwYveEENBTou/wEUKgMyZUTgJL/0qolsIhkhNZezIGOtm1c5mFyeuHijKFXvAdYMb2auRpcL0q/EcNJ8GDlNV1RNos4L8PXpRICZqRkcNGnvizExR626pdcESNVRksCq2rZUReGvxRrknSlcL0GprvyFiWOS5y218cgEK5NWku0rvnlbDea34lr7M8RqLQkmq8GA2fMA5phcEAafjo/N1+OfVgyjwrBOQ0CjwWN0FkVDMbS+bd1DDHX6B83Q5kF1vOzcofqXLw+i4Ziv7vaUBHEm1hXrSaU6TjiKz/rXP8HO13PBRTfbGRp723dio8/vnRclNnix+dMN1bz5Axnv5n8=</diagram></mxfile>
1+
<mxfile userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" version="9.3.1" editor="www.draw.io" type="device"><diagram id="58887138-f8ca-3a51-ea37-682e74172fa5" name="Page-1">3Vtbc5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