Skip to content

Commit 3f1dfb2

Browse files
MarGasioreknordicjm
authored andcommitted
doc: align Launch App doc variable naming with sample code
Align the Launch App documentation snippet variable name with the record_launch_app sample for consistency. Additionally align formatting in code snippets. Signed-off-by: Marcin Gasiorek <marcin.gasiorek@nordicsemi.no>
1 parent 860c808 commit 3f1dfb2

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

doc/nrf/libraries/nfc/ndef/launchapp.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ The following code snippets show how to generate a Launch App message.
3636
3737
int err;
3838
39-
err = nfc_launchapp_msg_encode(android_package_name,
40-
sizeof(android_package_name),
41-
universal_link,
42-
sizeof(universal_link),
43-
ndef_msg_buf,
44-
&len);
39+
err = nfc_launchapp_msg_encode(android_pkg_name,
40+
sizeof(android_pkg_name),
41+
universal_link,
42+
sizeof(universal_link),
43+
ndef_msg_buf,
44+
&len);
4545

4646
if (err < 0) {
47-
printk("Cannot encode message!\n");
48-
return err;
47+
printk("Cannot encode message!\n");
48+
return err;
4949
}
5050

5151
Provide the following parameters:

doc/nrf/libraries/nfc/ndef/msg_parser.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ The following code example shows how to parse an NDEF message, after you have us
2929
size_t desc_buf_len = sizeof(desc_buf);
3030
3131
err = nfc_ndef_msg_parse(desc_buf,
32-
&desc_buf_len,
33-
ndef_msg_buff,
34-
&nfc_data_len);
32+
&desc_buf_len,
33+
ndef_msg_buff,
34+
&nfc_data_len);
3535
3636
if (err) {
37-
printk("Error during parsing an NDEF message, err: %d.\n", err);
37+
printk("Error during parsing an NDEF message, err: %d.\n", err);
3838
}
3939
4040
nfc_ndef_msg_printout((struct nfc_ndef_msg_desc *) desc_buf);

doc/nrf/libraries/nfc/ndef/text_rec.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ The following code example shows how to generate a raw text message that contain
6060
6161
err = nfc_ndef_msg_encode(&NFC_NDEF_MSG(nfc_text_msg),
6262
buffer,
63-
len);
63+
&len);
6464
if (err < 0) {
6565
printk("Cannot encode message!\n");
66-
return err;
66+
return err;
6767
}
6868

6969
API documentation

doc/nrf/libraries/nfc/ndef/uri_msg.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ The following code snippets show how to generate a URI message.
3535
int err;
3636
3737
err = nfc_ndef_uri_msg_encode( NFC_URI_HTTP_WWW,
38-
m_url,
39-
sizeof(m_url),
40-
m_ndef_msg_buf,
41-
&len);
38+
m_url,
39+
sizeof(m_url),
40+
m_ndef_msg_buf,
41+
&len);
4242

4343
if (err < 0) {
44-
printk("Cannot encode message!\n");
44+
printk("Cannot encode message!\n");
4545
return err;
4646
}
4747

0 commit comments

Comments
 (0)