You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2016/07/05 21:02:25 UTC

[1/5] incubator-mynewt-site git commit: added RedBearLabs bsp to the list of supported boards

Repository: incubator-mynewt-site
Updated Branches:
  refs/heads/develop 12e0c2e94 -> da6fa5136


added RedBearLabs bsp to the list of supported boards


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/ea4e74e8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/ea4e74e8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/ea4e74e8

Branch: refs/heads/develop
Commit: ea4e74e8909d6facd151c6d4ab70b1d9fded08c3
Parents: 12e0c2e
Author: aditihilbert <ad...@runtime.io>
Authored: Tue Jun 28 17:13:43 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Tue Jun 28 17:13:43 2016 -0700

----------------------------------------------------------------------
 custom-theme/landing.html | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ea4e74e8/custom-theme/landing.html
----------------------------------------------------------------------
diff --git a/custom-theme/landing.html b/custom-theme/landing.html
index cb3dcab..5420d19 100644
--- a/custom-theme/landing.html
+++ b/custom-theme/landing.html
@@ -82,6 +82,9 @@
                     <a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF51822"> nRF51 DK </a> from Nordic Semiconductor (Cortex-M0)
                 </li>
                 <li>
+                    <a href="http://redbearlab.com/blenano/"> BLE Nano </a> from RedBearLabs (Nordic nRF51822 SoC based)
+                </li>
+                <li>
                     <a href="https://www.rigado.com/products/bmd-300-eval-kit/"> BMD-300-EVAL-ES </a> from Rigado (Cortex-M4)
                 </li>
                 <li>


[2/5] incubator-mynewt-site git commit: FCB; first take on module documentation.

Posted by ad...@apache.org.
FCB; first take on module documentation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/32d14b57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/32d14b57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/32d14b57

Branch: refs/heads/develop
Commit: 32d14b57cc5329a6005bf87540d1f0283335db8f
Parents: 12e0c2e
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Fri Jul 1 19:20:20 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Fri Jul 1 19:20:20 2016 -0700

----------------------------------------------------------------------
 docs/os/modules/fcb/fcb.md                   | 98 +++++++++++++++++++++++
 docs/os/modules/fcb/fcb_append.md            | 29 +++++++
 docs/os/modules/fcb/fcb_append_finish.md     | 25 ++++++
 docs/os/modules/fcb/fcb_append_to_scratch.md | 23 ++++++
 docs/os/modules/fcb/fcb_clear.md             | 23 ++++++
 docs/os/modules/fcb/fcb_getnext.md           | 28 +++++++
 docs/os/modules/fcb/fcb_init.md              | 25 ++++++
 docs/os/modules/fcb/fcb_is_empty.md          | 23 ++++++
 docs/os/modules/fcb/fcb_offset_last_n.md     | 28 +++++++
 docs/os/modules/fcb/fcb_rotate.md            | 22 +++++
 docs/os/modules/fcb/fcb_walk.md              | 32 ++++++++
 mkdocs.yml                                   | 13 +++
 12 files changed, 369 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb.md b/docs/os/modules/fcb/fcb.md
new file mode 100644
index 0000000..a442f28
--- /dev/null
+++ b/docs/os/modules/fcb/fcb.md
@@ -0,0 +1,98 @@
+# Flash Circular Buffer (FCB)
+
+Flash circular buffer provides an abstration through which you can treat flash like a FIFO. You append entries to the end, and read data from the beginning.
+
+###Description
+
+Elements in the flash contain the lenght of the element, the data within the element, and checksum over the element contents.
+
+Storage of elements in flash is done in a FIFO fashion. When user requests space for the next element, space is located at the end of the used area. When user starts reading, the first element served is the oldest element in flash.
+
+Elements can be appended to the of the area until storage space is exhausted. User has control over what happens next; either erase oldest block of data, thereby freeing up some space, or stop writing new data until existing data has been collected. FCB treats underlying storage as an array of flash sectors; when it erases old data, it does this a sector at a time.
+
+Elements in the flash are checksummed. That is how FCB detects whether writing element to flash completed ok. It will skip over entries which don't have a valid checksum.
+
+### Usage
+
+To add an element to circular buffer:
+
+* Call fcb_append() to get the location where data can be written. If this fails due to lack of space, you can call fcb_rotate() to make some. And then call fcb_append() again.
+* Use flash_area_write() to write element contents.
+* Call fcb_append_finish() when done. This completes the entry by calculating the checksum.
+
+To read contents of the circular buffer:
+* Call fcb_walk() with a pointer to your callback function.
+* Within callback function copy in data from the element using flash_area_read(). You can tell when all data from within a sector has been read by monitoring returned element's area pointer. Then you can call fcb_rotate(), if you're done with that data.
+
+Alternatively:
+* Call fcb_getnext() with 0 in element offset to get the pointer to oldest element.
+* Use flash_area_read() to read element contents.
+* Call fcb_getnext() with pointer to current element to get the next one. And so on.
+
+###Data structures
+
+This data structure describes the element location in the flash. You would use it figure out what parameters to pass to flash_area_read() to read element contents. Or to flash_area_write() when adding a new element.
+
+```c
+struct fcb_entry {
+    struct flash_area *fe_area;
+    uint32_t fe_elem_off;
+    uint32_t fe_data_off;
+    uint16_t fe_data_len;
+};
+```
+
+| Element | Description |
+|---------|-------------|
+| fe_area | Pointer to info about the flash sector. Pass this to flash_area_xx() routines. |
+| fe_elem_off | Byte offset from the start of the sector to beginning of element. |
+| fe_data_off | Byte offset from start of the sector to beginning of element data. Pass this to to flash_area_xx() routines. |
+| fe_data_len | Number of bytes in the element.  |
+
+
+The following data structure describes the FCB itself. First part should be filled in by the user before calling fcb_init(). The second part is used by FCB for it's internal bookkeeping.
+```c
+struct fcb {
+    /* Caller of fcb_init fills this in */
+    uint32_t f_magic;           /* As placed on the disk */
+    uint8_t f_version;          /* Current version number of the data */
+    uint8_t f_sector_cnt;       /* Number of elements in sector array */
+    uint8_t f_scratch_cnt;      /* How many sectors should be kept empty */
+    struct flash_area *f_sectors; /* Array of sectors, must be contiguous */
+
+    /* Flash circular buffer internal state */
+    struct os_mutex f_mtx;      /* Locking for accessing the FCB data */
+    struct flash_area *f_oldest;
+    struct fcb_entry f_active;
+    uint16_t f_active_id;
+    uint8_t f_align;            /* writes to flash have to aligned to this */
+};
+```
+
+| Element | Description |
+|---------|-------------|
+| f_magic | Magic number in the beginning of FCB flash sector. FCB uses this when determining whether sector contains valid data or not. |
+| f_version | Current version number of the data. Also stored in flash sector header. |
+| f_sector_cnt | Number of elements it the f_sectors array. |
+| f_scratch_cnt | Number of sectors to keep empty. This can be used if you need to have scratch space for garbage collecting when FCB fills up. |
+| f_sectors | Array of entries describing flash sectors to use. |
+| f_mtx | Lock protecting access to FCBs internal data. |
+| f_oldest | Pointer to flash sector containing the oldest data. This is where data is served when read is started. |
+| f_active | Flash location where the newest data is. This is used by fcb_append() to figure out where the data should go to. |
+| f_active_id | Flash sectors are assigned ever-increasing serial number. This is how FCB figures out where oldest data is on system restart. |
+| f_align | Some flashes have restrictions on alignment for writes. FCB keeps a copy of this number for the flash here. |
+
+###List of Functions
+
+The functions available in this OS feature are:
+
+* [fcb_init](fcb_init.md)
+* [fcb_append](fcb_append.md)
+* [fcb_append_finish](fcb_append_finish.md)
+* [fcb_walk](fcb_walk.md)
+* [fcb_getnext](fcb_getnext.md)
+* [fcb_rotate](fcb_rotate.md)
+* [fcb_append_to_scratch](fcb_append_to_scratch.md)
+* [fcb_is_empty](fcb_is_empty.md)
+* [fcb_offset_last_n](fcb_offset_last_n.md)
+* [fcb_clear](fcb_clear.md)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb_append.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb_append.md b/docs/os/modules/fcb/fcb_append.md
new file mode 100644
index 0000000..b79e75a
--- /dev/null
+++ b/docs/os/modules/fcb/fcb_append.md
@@ -0,0 +1,29 @@
+## <font color="F2853F" style="font-size:24pt">fcb_append</font>
+
+```no-highlight
+int fcb_append(struct fcb *fcb, uint16_t len, struct fcb_entry *append_loc);
+```
+
+Start writing a new element to flash. This routine reserves the space in the flash by writing out the element header.
+
+When writing the contents for the entry, use append_loc->fl_area and append_loc->fl_data_off as arguments to flash_area_write(). When finished, call fcb_append_finish() with append_loc as argument.
+
+#### Arguments
+
+| Arguments | Description |
+|-----------|-------------|
+| fcb | Points to FCB where data is written to. |
+| len | Number of bytes to reserve for the element. |
+| loc | Pointer to fcb_entry. fcb_append() will fill this with info about where the element can be written to. |
+
+#### Returned values
+
+Returns 0 on success; nonzero on failure.
+FCB_ERR_NOSPACE is returned if FCB is full.
+
+#### Notes
+
+If FCB is full, you need to make more space. This can be done by calling fcb_rotate(). Or if you've reserved scratch sectors, you can take those into use by calling fcb_append_to_scratch().
+
+#### Example
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb_append_finish.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb_append_finish.md b/docs/os/modules/fcb/fcb_append_finish.md
new file mode 100644
index 0000000..ab44e3a
--- /dev/null
+++ b/docs/os/modules/fcb/fcb_append_finish.md
@@ -0,0 +1,25 @@
+## <font color="F2853F" style="font-size:24pt">fcb_append_finish</font>
+
+```no-highlight
+int fcb_append_finish(struct fcb *fcb, struct fcb_entry *append_loc);
+```
+
+Finalizes the write of new element. FCB computes the checksum over the element and updates it in flash.
+
+#### Arguments
+
+| Arguments | Description |
+|-----------|-------------|
+| fcb | Points to FCB where data is written to. |
+| append_loc | Pointer to fcb_entry. Use the fcb_entry returned by fcb_append(). |
+
+#### Returned values
+
+Returns 0 on success; nonzero on failure.
+
+#### Notes
+
+You need to call fcb_append_finish() after writing the element contents. Otherwise FCB will consider this entry to be invalid, and skips over it when reading.
+
+#### Example
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb_append_to_scratch.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb_append_to_scratch.md b/docs/os/modules/fcb/fcb_append_to_scratch.md
new file mode 100644
index 0000000..d23fdc1
--- /dev/null
+++ b/docs/os/modules/fcb/fcb_append_to_scratch.md
@@ -0,0 +1,23 @@
+## <font color="F2853F" style="font-size:24pt">fcb_append_to_scratch</font>
+
+```no-highlight
+int fcb_append_to_scratch(struct fcb *fcb);
+```
+
+This can be used if FCB created to have scratch block(s). Once FCB fills up with data, fcb_append() will fail. This routine can be called to start using the reserve block.
+
+#### Arguments
+
+| Arguments | Description |
+|-----------|-------------|
+| fcb | Points to FCB. |
+
+
+#### Returned values
+
+Returns 0 on success; nonzero on failure.
+
+#### Notes
+
+#### Example
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb_clear.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb_clear.md b/docs/os/modules/fcb/fcb_clear.md
new file mode 100644
index 0000000..9e15b28
--- /dev/null
+++ b/docs/os/modules/fcb/fcb_clear.md
@@ -0,0 +1,23 @@
+## <font color="F2853F" style="font-size:24pt">fcb_clear</font>
+
+```no-highlight
+int fcb_clear(struct fcb *fcb);
+```
+
+Wipes out all data in FCB.
+
+#### Arguments
+
+| Arguments | Description |
+|-----------|-------------|
+| fcb | Points to FCB. |
+
+
+#### Returned values
+
+Returns 0 on success; non-zero otherwise.
+
+#### Notes
+
+#### Example
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb_getnext.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb_getnext.md b/docs/os/modules/fcb/fcb_getnext.md
new file mode 100644
index 0000000..bd2b8c0
--- /dev/null
+++ b/docs/os/modules/fcb/fcb_getnext.md
@@ -0,0 +1,28 @@
+## <font color="F2853F" style="font-size:24pt">fcb_getnext</font>
+
+```no-highlight
+int fcb_getnext(struct fcb *, struct fcb_entry *loc);
+```
+
+Given element in location in loc, return with loc filled in with information about next element.
+
+If loc->le_elem_off is set to 0, fcb_getnext() will return info about the oldest element in FCB.
+
+Entry data can be read within the callback using flash_area_read(), using loc->fe_area, loc->fe_data_off, and loc->fe_data_len as arguments.
+
+#### Arguments
+
+| Arguments | Description |
+|-----------|-------------|
+| fcb | Points to FCB where data is written to. |
+| loc | Info about element. On successful call 
+
+#### Returned values
+
+Returns 0 on success; nonzero on failure.
+Returns FCB_ERR_NOVAR when there are no more elements left.
+
+#### Notes
+
+#### Example
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb_init.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb_init.md b/docs/os/modules/fcb/fcb_init.md
new file mode 100644
index 0000000..7ad76d5
--- /dev/null
+++ b/docs/os/modules/fcb/fcb_init.md
@@ -0,0 +1,25 @@
+## <font color="F2853F" style="font-size:24pt">fcb_init</font>
+
+```no-highlight
+int fcb_init(struct fcb *);
+```
+
+Initializes FCB. This function walks through the given sectors, finding out how much data already exists in the flash.
+After calling this, you can start reading/writing data from FCB.
+
+#### Arguments
+
+| Arguments | Description |
+|-----------|-------------|
+| fcb | Structure describing the FCB. |
+
+#### Returned values
+
+Returns 0 on success; nonzero on failure.
+
+#### Notes
+
+User should fill in their portion of fcb before calling this function.
+
+#### Example
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb_is_empty.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb_is_empty.md b/docs/os/modules/fcb/fcb_is_empty.md
new file mode 100644
index 0000000..b18a598
--- /dev/null
+++ b/docs/os/modules/fcb/fcb_is_empty.md
@@ -0,0 +1,23 @@
+## <font color="F2853F" style="font-size:24pt">fcb_is_empty</font>
+
+```no-highlight
+int fcb_is_empty(struct fcb *fcb);
+```
+
+Returns 1 if there are no elements stored in FCB, otherwise returns 0.
+
+#### Arguments
+
+| Arguments | Description |
+|-----------|-------------|
+| fcb | Points to FCB. |
+
+
+#### Returned values
+
+See description.
+
+#### Notes
+
+#### Example
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb_offset_last_n.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb_offset_last_n.md b/docs/os/modules/fcb/fcb_offset_last_n.md
new file mode 100644
index 0000000..8eebb59
--- /dev/null
+++ b/docs/os/modules/fcb/fcb_offset_last_n.md
@@ -0,0 +1,28 @@
+## <font color="F2853F" style="font-size:24pt">fcb_offset_last_n</font>
+
+```no-highlight
+int fcb_offset_last_n(struct fcb *fcb, uint8_t entries, uint32_t *last_n_off);
+```
+
+Returns the offset of n-th last element.
+
+#### Arguments
+
+| Arguments | Description |
+|-----------|-------------|
+| fcb | Points to FCB. |
+| entries | How many entries to leave. |
+| last_n_off | Returned offset. |
+
+
+#### Returned values
+
+0 on success; non-zero on failure.
+
+#### Notes
+
+Returned offset is relative to beginning of the sector where the element is.
+Therefore, n-th last element must be found within the last sector of FCB.
+
+#### Example
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb_rotate.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb_rotate.md b/docs/os/modules/fcb/fcb_rotate.md
new file mode 100644
index 0000000..2aebbea
--- /dev/null
+++ b/docs/os/modules/fcb/fcb_rotate.md
@@ -0,0 +1,22 @@
+## <font color="F2853F" style="font-size:24pt">fcb_rotate</font>
+
+```no-highlight
+int fcb_rotate(struct fcb *fcb);
+```
+
+Erase the oldest sector in FCB.
+
+#### Arguments
+
+| Arguments | Description |
+|-----------|-------------|
+| fcb | Points to FCB. |
+
+#### Returned values
+
+Returns 0 on success; nonzero on failure.
+
+#### Notes
+
+#### Example
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/docs/os/modules/fcb/fcb_walk.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb_walk.md b/docs/os/modules/fcb/fcb_walk.md
new file mode 100644
index 0000000..949c6f2
--- /dev/null
+++ b/docs/os/modules/fcb/fcb_walk.md
@@ -0,0 +1,32 @@
+## <font color="F2853F" style="font-size:24pt">fcb_walk</font>
+
+```no-highlight
+typedef int (*fcb_walk_cb)(struct fcb_entry *loc, void *arg);
+
+int fcb_walk(struct fcb *fcb, struct flash_area *area, fcb_walk_cb cb,
+	void *cb_arg);
+```
+
+Walks over all log entries in FCB. Callback function cb gets called for every entry. If cb wants to stop the walk, it should return a non-zero value.
+
+If specific flash_area is specified, only entries within that sector are walked over.
+
+Entry data can be read within the callback using flash_area_read(), using loc->fe_area, loc->fe_data_off, and loc->fe_data_len as arguments.
+
+#### Arguments
+
+| Arguments | Description |
+|-----------|-------------|
+| fcb | Points to FCB where data is written to. |
+| area | Optional. Pointer to specific entry in fcb's array of sectors. |
+| cb | Callback function which gets called for every valid entry fcb_walk encounters. |
+| cb_arg | Optional. Parameter which gets passed to callback function.
+
+#### Returned values
+
+Returns 0 on success; nonzero on failure.
+
+#### Notes
+
+#### Example
+

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/32d14b57/mkdocs.yml
----------------------------------------------------------------------
diff --git a/mkdocs.yml b/mkdocs.yml
index fb5261d..e361cdf 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -314,6 +314,19 @@ pages:
                 - 'json_encode_object_key': 'os/modules/json/json_encode_object_key.md'
                 - 'json_encode_object_start': 'os/modules/json/json_encode_object_start.md'
                 - 'json_read_object': 'os/modules/json/json_read_object.md'
+	- Flash Circular Buffer:
+            - toc: 'os/modules/fcb/fcb.md'
+            - 'Functions':
+                - 'fcb_init': 'os/modules/fcb/fcb_init.md'
+                - 'fcb_append': 'os/modules/fcb/fcb_append.md'
+                - 'fcb_append_finish': 'os/modules/fcb/fcb_append_finish.md'
+                - 'fcb_walk': 'os/modules/fcb/fcb_walk.md'
+                - 'fcb_getnext': 'os/modules/fcb/fcb_getnext.md'
+                - 'fcb_rotate': 'os/modules/fcb/fcb_rotate.md'
+                - 'fcb_append_to_scratch': 'os/modules/fcb/fcb_append_to_scratch.md'
+                - 'fcb_is_empty': 'os/modules/fcb/fcb_is_empty.md'
+                - 'fcb_offset_last_n': 'os/modules/fcb/fcb_offset_last_n.md'
+                - 'fcb_clear': 'os/modules/fcb/fcb_clear.md'
         - Stats:
             - toc: 'os/modules/stats/stats.md'
         - Logs:


[3/5] incubator-mynewt-site git commit: Merge branch 'develop' of https://github.com/mkiiskila/incubator-mynewt-site into develop

Posted by ad...@apache.org.
Merge branch 'develop' of https://github.com/mkiiskila/incubator-mynewt-site into develop

This closes #100. Pull request by mkiiskila.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/c7b1a537
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/c7b1a537
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/c7b1a537

Branch: refs/heads/develop
Commit: c7b1a537f358eb7fd70c838ed9814d73a2c00444
Parents: ea4e74e 32d14b5
Author: aditihilbert <ad...@runtime.io>
Authored: Tue Jul 5 12:52:31 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Tue Jul 5 12:52:31 2016 -0700

----------------------------------------------------------------------
 docs/os/modules/fcb/fcb.md                   | 98 +++++++++++++++++++++++
 docs/os/modules/fcb/fcb_append.md            | 29 +++++++
 docs/os/modules/fcb/fcb_append_finish.md     | 25 ++++++
 docs/os/modules/fcb/fcb_append_to_scratch.md | 23 ++++++
 docs/os/modules/fcb/fcb_clear.md             | 23 ++++++
 docs/os/modules/fcb/fcb_getnext.md           | 28 +++++++
 docs/os/modules/fcb/fcb_init.md              | 25 ++++++
 docs/os/modules/fcb/fcb_is_empty.md          | 23 ++++++
 docs/os/modules/fcb/fcb_offset_last_n.md     | 28 +++++++
 docs/os/modules/fcb/fcb_rotate.md            | 22 +++++
 docs/os/modules/fcb/fcb_walk.md              | 32 ++++++++
 mkdocs.yml                                   | 13 +++
 12 files changed, 369 insertions(+)
----------------------------------------------------------------------



[5/5] incubator-mynewt-site git commit: Clarified instructions for committing code to github mirror

Posted by ad...@apache.org.
Clarified instructions for committing code to github mirror


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/da6fa513
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/da6fa513
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/da6fa513

Branch: refs/heads/develop
Commit: da6fa51360d78c1a1546693ad93621f1a6fd3fea
Parents: 0d7a246
Author: aditihilbert <ad...@runtime.io>
Authored: Tue Jul 5 14:01:04 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Tue Jul 5 14:01:04 2016 -0700

----------------------------------------------------------------------
 custom-theme/community.html | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/da6fa513/custom-theme/community.html
----------------------------------------------------------------------
diff --git a/custom-theme/community.html b/custom-theme/community.html
index f9319bc..187daa3 100644
--- a/custom-theme/community.html
+++ b/custom-theme/community.html
@@ -67,12 +67,12 @@
 
                 <h3>Contributing Code</h3>
                 <p>
-                You can start contributing right away, even if you are not a committer on Apache Mynewt! One requirement is that you adhere to the Apache's proposed workflow as explained <a href="https://git-wip-us.apache.org/docs/workflow.html">here</a>. Basically, you submit your initial edits for your peers to review and merge. After a few successful patches under your belt, you will get access to commit code directly to the module you are working on in the repository. And over time, you will get full access to all the repositories, where you can commit code to any module. </p>
+                You can start contributing right away, even if you are not a committer on Apache Mynewt! One requirement is that you adhere to the Apache's proposed workflow as explained <a href="https://git-wip-us.apache.org/docs/workflow.html">here</a>. Basically, you submit your initial edits for your peers to review and merge. After a few successful patches under your belt, you will get access to commit code directly to the module you are working on in the repository. And over time, you will get full access to all the repositories, where you can commit code to any module on the apache git repository (and not the github mirror). </p>
                 <p>You may choose to submit patches in one of the two following ways:
                 <br>
                 <ol>
                 <li>
-                Fork the mirrored repository to create your very own repo on github. Clone the forked repository into a local branch on your machine and make your changes. Then submit a pull request from the fork on the github mirror of the appropriate Apache Mynewt repository by clicking the green "New pull request" button on the page:
+                Fork the mirrored repository to create your very own repo on github. Clone the forked repository into a local branch on your machine. <mark> Either checkout the `develop` branch and make your changes in the develop branch or create a new branch out of `develop` and work there.</mark> Then submit a <mark> pull request to the `develop` branch </mark> on the github mirror of the appropriate Apache Mynewt repository by clicking the green "New pull request" button on your github fork page:
                    <ul>
                    <br>
                    <li><a href="https://github.com/apache/incubator-mynewt-larva">Apache Mynewt larva repo mirrored on github</a></li>
@@ -82,7 +82,8 @@
                    <li><a href="https://github.com/apache/incubator-mynewt-site">Apache Mynewt documentation repo mirrored on github</a></li>
                    <br>
                    </ul>
-                <p>In the comment for the pull request, include a description of the changes you have made and why. Github will automatically notify everyone on the commits@mynewt.incubator.apache.org mailing list about the newly opened pull requests. You can open a pull request even if you don't think the code is ready for merging but want some discussion on the matter. </p>
+                <p> <mark>The bottomline is to work with the `develop` branch. </mark> It has the latest code and you want your changes tested, working, and merged with that codebase. In the comment for the pull request, include a description of the changes you have made and why. Github will automatically notify everyone on the commits@mynewt.incubator.apache.org mailing list about the newly opened pull requests. You can open a pull request even if you don't think the code is ready for merging but want some discussion on the matter. </p>
+                <p> If you have already submitted a pull request against the `develop` branch on the mirror but have modified your code futher (e.g. after some feedback from the community or another clever idea popping into your head) <mark> there is no need to open a new pull request</mark>. The old pull request will get updated with your changes. Always remember to <mark> fetch the latest code from `develop` before committing your changes to the branch.</mark> </p>
                 <p> Upon receiving notification, one or more committers will review your work, ask for edits or clarifications, and merge when your proposed changes are ready.</p>
                 </li>
                 <li>


[4/5] incubator-mynewt-site git commit: fixed typos in fcb documentation

Posted by ad...@apache.org.
fixed typos in fcb documentation


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/0d7a246e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/0d7a246e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/0d7a246e

Branch: refs/heads/develop
Commit: 0d7a246e8d13eba2cce6ee2d9741fb4e593b1c95
Parents: c7b1a53
Author: aditihilbert <ad...@runtime.io>
Authored: Tue Jul 5 13:29:03 2016 -0700
Committer: aditihilbert <ad...@runtime.io>
Committed: Tue Jul 5 13:29:03 2016 -0700

----------------------------------------------------------------------
 docs/os/modules/fcb/fcb.md     | 10 +++++-----
 docs/os/tutorials/tutorials.md |  1 +
 mkdocs.yml                     |  2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0d7a246e/docs/os/modules/fcb/fcb.md
----------------------------------------------------------------------
diff --git a/docs/os/modules/fcb/fcb.md b/docs/os/modules/fcb/fcb.md
index a442f28..149c857 100644
--- a/docs/os/modules/fcb/fcb.md
+++ b/docs/os/modules/fcb/fcb.md
@@ -4,11 +4,11 @@ Flash circular buffer provides an abstration through which you can treat flash l
 
 ###Description
 
-Elements in the flash contain the lenght of the element, the data within the element, and checksum over the element contents.
+Elements in the flash contain the length of the element, the data within the element, and checksum over the element contents.
 
 Storage of elements in flash is done in a FIFO fashion. When user requests space for the next element, space is located at the end of the used area. When user starts reading, the first element served is the oldest element in flash.
 
-Elements can be appended to the of the area until storage space is exhausted. User has control over what happens next; either erase oldest block of data, thereby freeing up some space, or stop writing new data until existing data has been collected. FCB treats underlying storage as an array of flash sectors; when it erases old data, it does this a sector at a time.
+Elements can be appended to the end of the area until storage space is exhausted. User has control over what happens next; either erase oldest block of data, thereby freeing up some space, or stop writing new data until existing data has been collected. FCB treats underlying storage as an array of flash sectors; when it erases old data, it does this a sector at a time.
 
 Elements in the flash are checksummed. That is how FCB detects whether writing element to flash completed ok. It will skip over entries which don't have a valid checksum.
 
@@ -50,7 +50,7 @@ struct fcb_entry {
 | fe_data_len | Number of bytes in the element.  |
 
 
-The following data structure describes the FCB itself. First part should be filled in by the user before calling fcb_init(). The second part is used by FCB for it's internal bookkeeping.
+The following data structure describes the FCB itself. First part should be filled in by the user before calling fcb_init(). The second part is used by FCB for its internal bookkeeping.
 ```c
 struct fcb {
     /* Caller of fcb_init fills this in */
@@ -73,13 +73,13 @@ struct fcb {
 |---------|-------------|
 | f_magic | Magic number in the beginning of FCB flash sector. FCB uses this when determining whether sector contains valid data or not. |
 | f_version | Current version number of the data. Also stored in flash sector header. |
-| f_sector_cnt | Number of elements it the f_sectors array. |
+| f_sector_cnt | Number of elements in the f_sectors array. |
 | f_scratch_cnt | Number of sectors to keep empty. This can be used if you need to have scratch space for garbage collecting when FCB fills up. |
 | f_sectors | Array of entries describing flash sectors to use. |
 | f_mtx | Lock protecting access to FCBs internal data. |
 | f_oldest | Pointer to flash sector containing the oldest data. This is where data is served when read is started. |
 | f_active | Flash location where the newest data is. This is used by fcb_append() to figure out where the data should go to. |
-| f_active_id | Flash sectors are assigned ever-increasing serial number. This is how FCB figures out where oldest data is on system restart. |
+| f_active_id | Flash sectors are assigned ever-increasing serial numbers. This is how FCB figures out where oldest data is on system restart. |
 | f_align | Some flashes have restrictions on alignment for writes. FCB keeps a copy of this number for the flash here. |
 
 ###List of Functions

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0d7a246e/docs/os/tutorials/tutorials.md
----------------------------------------------------------------------
diff --git a/docs/os/tutorials/tutorials.md b/docs/os/tutorials/tutorials.md
index 59e2dae..3aaaeb2 100644
--- a/docs/os/tutorials/tutorials.md
+++ b/docs/os/tutorials/tutorials.md
@@ -39,6 +39,7 @@ The tutorials fall into a few broad categories. Some examples in each category a
 
 * Bluetooth Low Energy
     * [Running the example BLE app included in the repo](bletiny_project.md)
+    * [Working with another example BLE app for a peripheral device](bleprph/bleprph-intro.md)
 
 <br>
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/0d7a246e/mkdocs.yml
----------------------------------------------------------------------
diff --git a/mkdocs.yml b/mkdocs.yml
index e361cdf..663f91f 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -314,7 +314,7 @@ pages:
                 - 'json_encode_object_key': 'os/modules/json/json_encode_object_key.md'
                 - 'json_encode_object_start': 'os/modules/json/json_encode_object_start.md'
                 - 'json_read_object': 'os/modules/json/json_read_object.md'
-	- Flash Circular Buffer:
+        - Flash Circular Buffer:
             - toc: 'os/modules/fcb/fcb.md'
             - 'Functions':
                 - 'fcb_init': 'os/modules/fcb/fcb_init.md'