Skip to content

Commit a3676e3

Browse files
authored
Merge pull request #58 from marcosboger/patch-1
Adjusting Blynk C API Docs
2 parents cc74c07 + 1354db8 commit a3676e3

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

mongoose-os/api/cloud/blynk.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ wide class of applications. It currently only works with Blynk Legacy and is not
6262
typedef void (*blynk_handler_t)(struct mg_connection *, const char *cmd,
6363
int pin, int val, int id, void *user_data);
6464
```
65-
> Blynk event handler signature.
65+
Blynk event handler signature.
6666
#### blynk_set_handler
6767
6868
```c
6969
void blynk_set_handler(blynk_handler_t func, void *user_data);
7070
```
71-
> Set Blynk event handler. Everytime a Blynk event is raised, func will be called to treat that Event.
71+
Set Blynk event handler. Everytime a Blynk event is raised, func will be called to treat that Event.
7272
Example:
7373
```c
7474
// Defines Default Handler Func, sets that func using blynk_set_handler. The handler Func checks if there is a Virtual Read command and if true, sends virtual write that sets s_read_virtual_pin to 1
@@ -81,7 +81,6 @@ void default_blynk_handler(struct mg_connection *c, const char *cmd,
8181
}
8282
(void) user_data;
8383
}
84-
8584
enum mgos_app_init_result mgos_app_init(void) {
8685
blynk_set_handler(default_blynk_handler, NULL);
8786
return MGOS_APP_INIT_SUCCESS;
@@ -93,7 +92,7 @@ enum mgos_app_init_result mgos_app_init(void) {
9392
void blynk_send(struct mg_connection *c, uint8_t type, uint16_t id,
9493
const void *data, uint16_t len);
9594
```
96-
> Send data to the Blynk server. `c` is a network connection which is passed to the handler registered
95+
Send data to the Blynk server. `c` is a network connection which is passed to the handler registered
9796
with `blynk_set_handler`. `type` is one of the following:
9897

9998
- `BLYNK_RESPONSE`
@@ -108,13 +107,13 @@ with `blynk_set_handler`. `type` is one of the following:
108107
void blynk_printf(struct mg_connection *c, uint8_t type, uint16_t id,
109108
const char *fmt, ...);
110109
```
111-
> Same as as `blynk_send()`, formats message using `printf()` semantics.
110+
Same as as `blynk_send()`, formats message using `printf()` semantics.
112111
#### blynk_virtual_write
113112
114113
```c
115114
void blynk_virtual_write(struct mg_connection *c, int pin, float val, int id);
116115
```
117-
> Send a virtual write command. If id is undefined, it will be autogenerated.
116+
Send a virtual write command. If id is undefined, it will be autogenerated.
118117
This is a helper function that uses `blynk_send()`.
119118

120119
### JS API

0 commit comments

Comments
 (0)