-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve code formatting and documentation
- Loading branch information
Purva Yeshi
committed
Jan 30, 2025
1 parent
1d030d6
commit 864b7a7
Showing
3 changed files
with
84 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,60 @@ | ||
.. _eeprom_operations: | ||
|
||
.. _eeprom_operations: | ||
|
||
EEPROM Operations | ||
############### | ||
################# | ||
|
||
Overview | ||
******** | ||
|
||
A sample that reads data from flash memory, as well as writes data to flash memory. | ||
Read and write data from flash memory using this sample. | ||
|
||
Prerequisites and Setup | ||
*********************** | ||
|
||
Use any board that supports Zephyr RTOS. | ||
This example uses **BeagleConnect Freedom**. | ||
|
||
For setup, refer to the `documentation <https://docs.beagle.cc/boards/beagleconnect/freedom/demos-and-tutorials/using-arduino-zephyr-template.html#setup-arduino-workspace>`_. | ||
|
||
Build and Test | ||
************** | ||
|
||
Follow these steps to set up and run the sample in the `arduino-workspace` directory: | ||
|
||
1. **Set up the virtual environment:** | ||
|
||
.. code-block:: bash | ||
source .venv/bin/activate | ||
2. **Build the EEPROM operations sample:** | ||
|
||
.. code-block:: bash | ||
west build -b beagleconnect_freedom modules/lib/Arduino-Zephyr-API/samples/eeprom_operations -p | ||
3. **Flash the code after connecting BeagleConnect Freedom to your device:** | ||
|
||
.. code-block:: bash | ||
west flash | ||
4. **Open the serial console to view the output:** | ||
|
||
.. code-block:: bash | ||
tio /dev/ttyACM0 | ||
Sample Output | ||
************* | ||
|
||
Run the code and observe the following output: | ||
|
||
.. code-block:: text | ||
Serial communication initialized | ||
NVS initialized | ||
Data written successfully | ||
Data read: 1234 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters