summaryrefslogtreecommitdiff
path: root/atmel-samd
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-01-05 16:20:46 -0800
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-01-05 16:20:46 -0800
commit7c302c395ec699738bade269673c06a38cbedbff (patch)
tree56280be561c525e52e7823c76e7b4645ff17442c /atmel-samd
parent25ae844d555b489eebd1ca3e80cc34f67182e205 (diff)
Improve docs and update to CircuitPython.
Diffstat (limited to 'atmel-samd')
-rw-r--r--atmel-samd/README.rst (renamed from atmel-samd/README.md)36
-rw-r--r--atmel-samd/bindings/samd/__init__.c10
2 files changed, 31 insertions, 15 deletions
diff --git a/atmel-samd/README.md b/atmel-samd/README.rst
index 105f629e8..f9f60dc27 100644
--- a/atmel-samd/README.md
+++ b/atmel-samd/README.rst
@@ -1,23 +1,28 @@
-# SAMD21x18
+SAMD21x18
+=========
This port brings MicroPython to SAMD21x18 based development boards including the
Arduino Zero, Adafruit Feather M0 Basic and Adafruit M0 Bluefruit LE.
-## Building
+Building
+--------
To build for the Arduino Zero:
make
-To build for other boards you must change it by setting `BOARD`. For example:
+To build for other boards you must change it by setting ``BOARD``. For example:
make BOARD=feather_m0_basic
-Board names are the directory names in the `boards` folder.
+Board names are the directory names in the `boards <https://github.com/adafruit/circuitpython/tree/master/atmel-samd/boards>`_ folder.
-## Deploying
+Deploying
+---------
+
+Arduino Bootloader
+^^^^^^^^^^^^^^^^^^
-### Arduino Bootloader
If your board has an existing Arduino bootloader on it then you can use bossac
to flash MicroPython. First, activate the bootloader. On Adafruit Feathers you
can double click the reset button and the #13 will fade in and out. Finally,
@@ -25,7 +30,9 @@ run bossac:
tools/bossac_osx -e -w -v -b -R build-feather_m0_basic/firmware.bin
-### No Bootloader via GDB
+No Bootloader via GDB
+^^^^^^^^^^^^^^^^^^^^^
+
This method works for loading MicroPython onto the Arduino Zero via the
programming port rather than the native USB port.
@@ -45,9 +52,11 @@ In another terminal from `micropython/atmel-samd`:
...
(gdb) continue
-## Connecting
+Connecting
+----------
-### Serial
+Serial
+^^^^^^
All boards are currently configured to work over USB rather than UART. To
connect to it from OSX do something like this:
@@ -57,7 +66,14 @@ connect to it from OSX do something like this:
You may not see a prompt immediately because it doesn't know you connected. To
get one either hit enter to get `>>>` or do CTRL-B to get the full header.
-### Mass storage
+Mass storage
+^^^^^^^^^^^^
All boards will also show up as a mass storage device. Make sure to eject it
before referring to any files.
+
+Port Specific modules
+---------------------
+
+.. toctree::
+ bindings/samd/__init__
diff --git a/atmel-samd/bindings/samd/__init__.c b/atmel-samd/bindings/samd/__init__.c
index 59bded69d..62deb78c5 100644
--- a/atmel-samd/bindings/samd/__init__.c
+++ b/atmel-samd/bindings/samd/__init__.c
@@ -35,9 +35,9 @@
//| :platform: SAMD21
//|
-//| .. method:: enable_autoreset()
+//| .. method:: enable_autoreset()
//|
-//| Enable autoreset based on USB file write activity.
+//| Enable autoreset based on USB file write activity.
//|
STATIC mp_obj_t samd_enable_autoreset(void) {
autoreset_enable();
@@ -45,10 +45,10 @@ STATIC mp_obj_t samd_enable_autoreset(void) {
}
MP_DEFINE_CONST_FUN_OBJ_0(samd_enable_autoreset_obj, samd_enable_autoreset);
-//| .. method:: disable_autoreset()
+//| .. method:: disable_autoreset()
//|
-//| Disable autoreset based on USB file write activity until the next reset
-//| or until `enable_autoreset` is called.
+//| Disable autoreset based on USB file write activity until the next reset
+//| or until `enable_autoreset` is called.
//|
STATIC mp_obj_t samd_disable_autoreset(void) {
autoreset_disable();