Skip to content

Commit 330d488

Browse files
authored
Merge branch 'development-publish' into AnkithB2020-patch-1
2 parents a2d5481 + 85fa20a commit 330d488

28 files changed

+868
-449
lines changed

amplify.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
version: 0.1
1+
version: 0.2
22
frontend:
33
phases:
44
build:
55
commands:
6-
- wget https://github.com/gohugoio/hugo/releases/download/v0.54.0/hugo_0.54.0_Linux-64bit.tar.gz
7-
- tar -xf hugo_0.54.0_Linux-64bit.tar.gz hugo
6+
- wget https://github.com/gohugoio/hugo/releases/download/v0.58.3/hugo_0.58.3_Linux-64bit.tar.gz
7+
- tar -xf hugo_0.58.3_Linux-64bit.tar.gz hugo
88
- mv hugo /usr/bin/hugo
9-
- rm -rf hugo_0.54.0_Linux-64bit.tar.gz
9+
- rm -rf hugo_0.58.3_Linux-64bit.tar.gz
1010
- hugo
1111
artifacts:
1212
baseDirectory: public

config.toml

Lines changed: 68 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
baseURL = "https://docs.pycom.io/"
1+
baseURL = "https://development.pycom.io/"
22
languageCode = "en-us"
33
title = "documentation"
44
uglyurls = false
@@ -198,12 +198,12 @@ theme = "doc-theme"
198198
parent = "gettingstarted@registration@lora"
199199
weight = 10
200200

201-
# [[menu.main]]
202-
# name = "Objenious"
203-
# url = "/gettingstarted/registration/lora/objenious/"
204-
# identifier = "gettingstarted@registration@lora@objenious"
205-
# parent = "gettingstarted@registration@lora"
206-
# weight = 20
201+
[[menu.main]]
202+
name = "Objenious"
203+
url = "/gettingstarted/registration/lora/objenious/"
204+
identifier = "gettingstarted@registration@lora@objenious"
205+
parent = "gettingstarted@registration@lora"
206+
weight = 20
207207

208208
# *** Pymakr Plugin
209209
[[menu.main]]
@@ -338,6 +338,13 @@ theme = "doc-theme"
338338
parent = "tutorials@all"
339339
weight = 10
340340

341+
[[menu.main]]
342+
name = "PyGate"
343+
url = "/tutorials/all/PyGate/"
344+
identifier = "tutorials@all@PyGate"
345+
parent = "tutorials@all"
346+
weight = 10
347+
341348
[[menu.main]]
342349
name = "WLAN"
343350
url = "/tutorials/all/wlan/"
@@ -520,6 +527,20 @@ theme = "doc-theme"
520527
parent = "tutorials@lora"
521528
weight = 70
522529

530+
[[menu.main]]
531+
name = "LoRa Mesh"
532+
url = "/tutorials/lora/lora-mesh/"
533+
identifier = "tutorials@lora@lora-mesh"
534+
parent = "tutorials@lora"
535+
weight = 80
536+
537+
[[menu.main]]
538+
name = "PyMesh Border Router"
539+
url = "/tutorials/lora/pymesh-br/"
540+
identifier = "tutorials@lora@pymesh-br"
541+
parent = "tutorials@lora"
542+
weight = 90
543+
523544
[[menu.main]]
524545
name = "Sigfox Examples"
525546
url = "/tutorials/sigfox/"
@@ -611,26 +632,26 @@ theme = "doc-theme"
611632
parent = "firmwareapi@pycom@machine"
612633
weight = 10
613634

635+
[[menu.main]]
636+
name = "CAN"
637+
url = "/firmwareapi/pycom/machine/can/"
638+
identifier = "firmwareapi@pycom@machine@can"
639+
parent = "firmwareapi@pycom@machine"
640+
weight = 20
641+
614642
[[menu.main]]
615643
name = "DAC"
616644
url = "/firmwareapi/pycom/machine/dac/"
617645
identifier = "firmwareapi@pycom@machine@dac"
618646
parent = "firmwareapi@pycom@machine"
619-
weight = 20
647+
weight = 30
620648

621649
[[menu.main]]
622650
name = "I2C"
623651
url = "/firmwareapi/pycom/machine/i2c/"
624652
identifier = "firmwareapi@pycom@machine@i2c"
625653
parent = "firmwareapi@pycom@machine"
626-
weight = 30
627-
628-
[[menu.main]]
629-
name = "Pin"
630-
url = "/firmwareapi/pycom/machine/pin/"
631-
identifier = "firmwareapi@pycom@machine@pin"
632-
parent = "firmwareapi@pycom@machine"
633-
weight = 40
654+
weight = 35
634655

635656
[[menu.main]]
636657
name = "PWM"
@@ -640,58 +661,58 @@ theme = "doc-theme"
640661
weight = 50
641662

642663
[[menu.main]]
643-
name = "RTC"
644-
url = "/firmwareapi/pycom/machine/rtc/"
645-
identifier = "firmwareapi@pycom@machine@rtc"
664+
name = "Pin"
665+
url = "/firmwareapi/pycom/machine/pin/"
666+
identifier = "firmwareapi@pycom@machine@pin"
646667
parent = "firmwareapi@pycom@machine"
647668
weight = 60
648669

649670
[[menu.main]]
650-
name = "SPI"
651-
url = "/firmwareapi/pycom/machine/spi/"
652-
identifier = "firmwareapi@pycom@machine@spi"
671+
name = "RMT"
672+
url = "/firmwareapi/pycom/machine/rmt/"
673+
identifier = "firmwareapi@pycom@machine@rmt"
653674
parent = "firmwareapi@pycom@machine"
654675
weight = 70
655676

656677
[[menu.main]]
657-
name = "UART"
658-
url = "/firmwareapi/pycom/machine/uart/"
659-
identifier = "firmwareapi@pycom@machine@uart"
678+
name = "RTC"
679+
url = "/firmwareapi/pycom/machine/rtc/"
680+
identifier = "firmwareapi@pycom@machine@rtc"
660681
parent = "firmwareapi@pycom@machine"
661682
weight = 80
662683

663684
[[menu.main]]
664-
name = "WDT"
665-
url = "/firmwareapi/pycom/machine/wdt/"
666-
identifier = "firmwareapi@pycom@machine@wdt"
685+
name = "SD"
686+
url = "/firmwareapi/pycom/machine/sd/"
687+
identifier = "firmwareapi@pycom@machine@sd"
667688
parent = "firmwareapi@pycom@machine"
668689
weight = 90
669690

670691
[[menu.main]]
671-
name = "Timer"
672-
url = "/firmwareapi/pycom/machine/timer/"
673-
identifier = "firmwareapi@pycom@machine@timer"
692+
name = "SPI"
693+
url = "/firmwareapi/pycom/machine/spi/"
694+
identifier = "firmwareapi@pycom@machine@spi"
674695
parent = "firmwareapi@pycom@machine"
675696
weight = 100
676697

677698
[[menu.main]]
678-
name = "SD"
679-
url = "/firmwareapi/pycom/machine/sd/"
680-
identifier = "firmwareapi@pycom@machine@sd"
699+
name = "Timer"
700+
url = "/firmwareapi/pycom/machine/timer/"
701+
identifier = "firmwareapi@pycom@machine@timer"
681702
parent = "firmwareapi@pycom@machine"
682703
weight = 110
683704

684705
[[menu.main]]
685-
name = "CAN"
686-
url = "/firmwareapi/pycom/machine/can/"
687-
identifier = "firmwareapi@pycom@machine@can"
706+
name = "UART"
707+
url = "/firmwareapi/pycom/machine/uart/"
708+
identifier = "firmwareapi@pycom@machine@uart"
688709
parent = "firmwareapi@pycom@machine"
689710
weight = 120
690711

691712
[[menu.main]]
692-
name = "RMT"
693-
url = "/firmwareapi/pycom/machine/rmt/"
694-
identifier = "firmwareapi@pycom@machine@rmt"
713+
name = "WDT"
714+
url = "/firmwareapi/pycom/machine/wdt/"
715+
identifier = "firmwareapi@pycom@machine@wdt"
695716
parent = "firmwareapi@pycom@machine"
696717
weight = 130
697718

@@ -948,14 +969,20 @@ theme = "doc-theme"
948969
parent = "firmwareapi@micropython"
949970
weight = 90
950971

951-
# [Errno 2] No such file or directory: './content/firmwareapi/micropython/ustruct/README.md'
952972
[[menu.main]]
953973
name = "ustruct"
954974
url = "/firmwareapi/micropython/ustruct/"
955975
identifier = "firmwareapi@micropython@ustruct"
956976
parent = "firmwareapi@micropython"
957977
weight = 180
958978

979+
[[menu.main]]
980+
name = "uzlib"
981+
url = "/firmwareapi/micropython/uzlib/"
982+
identifier = "firmwareapi@micropython@uzlib"
983+
parent = "firmwareapi@micropython"
984+
weight = 200
985+
959986
[[menu.main]]
960987
name = "_thread"
961988
url = "/firmwareapi/micropython/_thread/"

content/advance/downgrade.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ aliases:
44
- advance/downgrade.html
55
- advance/downgrade.md
66
- chapter/advance/downgrade
7-
87
---
98

109
The firmware upgrade tool usually updates your device to the latest available firmware version. If you require to downgrade your device to a previous firmware there are two methods to achieve this.

content/docnotes/syntax.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ The Pycom documentation follows standard Python Library format using the popular
1515
The values of the arguments (as seen in the examples/docs) refer to the default values that are passed into the constructor if nothing is provided.
1616

1717
```python
18-
1918
i2c.init(mode, * , baudrate=100000, pins=(SDA, SCL))
2019
```
2120

2221
An example of what this method might be called:
2322

2423
```python
25-
2624
i2c.init(I2C.MASTER, pins=('P12', 'P11'))
2725
```
2826

@@ -37,12 +35,10 @@ It is important to note that there are certain class methods that can only accep
3735
An asterisk `*` in a method description \(in the docs\), denotes that the following arguments require a keyword, i.e. `pin='P16'` in the example below.
3836

3937
```python
40-
4138
adc.channel(* , pin, attn=ADC.ATTN_0DB)
4239
```
4340

4441
```python
45-
4642
from machine import ADC
4743

4844
adc = ADC() # create an ADC object
@@ -54,7 +50,6 @@ apin = adc.channel(pin='P16') # create an analog pin on P16
5450
Another example shows how the `PWM` class, `pwm.channel()` requires a keyword argument for `pin` but does not for `id`.
5551

5652
```python
57-
5853
from machine import PWM
5954

6055
pwm = PWM(0, frequency=5000)
@@ -66,14 +61,12 @@ pwm_c = pwm.channel(0, pin='P12') # no keyword argument required for id (0) but
6661
The documentation may refer to a method that takes an argument listed by name but does allow for a keyword to be passed. For example, the `pycom` class contains a method `rgbled`. This lists that the method accepts a value for `color`, however this may not be specified by `keyword`, only `value`. This is intentional as the `value` being passed is the only argument valid for this method
6762

6863
```python
69-
7064
pycom.rgbled(color)
7165
```
7266

7367
If the argument is passed into the method with a keyword, it will return an error stating TypeError: function does not take keyword arguments.
7468

7569
```python
76-
7770
import pycom
7871

7972
pycom.rgbled(color=0xFF0000) # Incorrect
@@ -83,12 +76,10 @@ pycom.rgbled(0xFF0000) # Correct
8376
Another example of a method that only accepts value input. In this case, the `RTC.init()` method require a value (`tuple`) input for the `datetime`. It will not accept a keyword.
8477

8578
```python
86-
8779
rtc.init(datetime)
8880
```
8981

9082
```python
91-
9283
from machine import RTC
9384

9485
rtc = RTC()
@@ -101,7 +92,6 @@ rtc.init((2014, 5, 1, 4, 13, 0, 0, 0)) # Correct
10192
The `constants` section of a library within the docs refers to specific values from that library's class. These might be used when constructing an object from that class or when utilising a method from within that class. These are generally listed by the library name followed by the specific value. See the example below:
10293

10394
```python
104-
10595
I2C.MASTER()
10696
```
10797

content/firmwareapi/pycom/aes.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ AES is implemented using the ESP32 hardware module.
1515
## Quick Usage Example
1616

1717
```python
18-
1918
from crypto import AES
2019
import crypto
2120
key = b'notsuchsecretkey' # 128 bit (16 bytes) key

content/firmwareapi/pycom/machine/_index.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ Returns CPU frequency in hertz.
4646

4747
Gates the clock to the CPU, useful to reduce power consumption at any time during short or long periods. Peripherals continue working and execution resumes as soon as any interrupt is triggered (on many ports this includes system timer interrupt occurring at regular intervals on the order of millisecond).
4848

49+
#### machine.sleep(\[time\_ms\], resume\_wifi\_ble)
50+
51+
Sets the device in to light sleep mode , where in this mode digital peripherals, most of the RAM, and CPUs are clock-gated, and supply voltage is reduced. Upon exit from light sleep, peripherals and CPUs resume operation, their internal state is preserved.
52+
53+
* `time_ms` is the time in milliseconds that the device should wakeup after, if no time is given the device will sleep until the next reset cycle unless another wakeup source is configured.
54+
* `resume_wifi_ble` is a boolean value that enables or disable restoring after wakeup any WiFi or BLE connection that was interrupted by light sleep.
55+
* `True` Enable WiFi/BLE connections restoration
56+
* `False` Disable Wifi/BLE connections restoration, default option is Disabled
57+
58+
_Note: in light sleep mode LoRa/Lte modems are stopped and have to be re-initialized after wakeup._
59+
4960
#### machine.deepsleep(\[time\_ms\])
5061

5162
Stops the CPU and all peripherals, including the networking interfaces (except for LTE). Execution is resumed from the main script, just as with a reset. If a value in milliseconds is given then the device will wake up after that period of time, otherwise it will remain in deep sleep until the reset button is pressed.
@@ -54,7 +65,7 @@ Products with LTE connectivity, such as the FiPy, GPy, G01, need to have the LTE
5465

5566
#### machine.pin\_sleep\_wakeup(pins, mode, enable\_pull)
5667

57-
Configure pins to wake up from sleep mode. The pins which have this capability are: `P2, P3, P4, P6, P8 to P10 and P13 to P23`.
68+
Configure pins to wake up from deep/light sleep mode. The pins which have this capability are: `P2, P3, P4, P6, P8 to P10 and P13 to P23`.
5869

5970
The arguments are:
6071

content/firmwareapi/pycom/machine/rtc.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,24 @@ Returns `True` if the last `ntp_sync` has been completed, `False` otherwise:
8585
rtc.synced()
8686
```
8787

88+
#### rtc.memory(\[data\])
89+
90+
Reads RTC memory contents or write data in passed Buffer in to RTC memory
91+
92+
Example:
93+
94+
```python
95+
rtc = RTC()
96+
rtc.memory(b'10101010') # writes data in RTC memory
97+
rtc.memory()
98+
```
99+
100+
Output:
101+
102+
```python
103+
b'10101010'
104+
```
105+
88106
## Constants
89107

90108
* Clock source: `RTC.INTERNAL_RC`, `RTC.XTAL_32KHZ`

content/firmwareapi/pycom/machine/timer.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ Get the elapsed time in microseconds.
7272
Example:
7373

7474
```python
75-
7675
from machine import Timer
7776
import time
7877

@@ -111,7 +110,6 @@ Disables the alarm.
111110
Example:
112111

113112
```python
114-
115113
from machine import Timer
116114

117115
class Clock:

content/firmwareapi/pycom/machine/uart.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ On the GPy/FiPy UART2 is unavailable because it is used to communicate with the
8383

8484
## Methods
8585

86-
#### uart.init(baudrate=9600, bits=8, parity=None, stop=1, \* , timeout\_chars=2, pins=(TXD, RXD, RTS, CTS))
86+
#### uart.init(baudrate=9600, bits=8, parity=None, stop=1, \* , timeout\_chars=2, pins=(TXD, RXD, RTS, CTS), rx\_buffer\_size=512)
8787

8888
Initialise the UART bus with the given parameters:
8989

@@ -93,6 +93,7 @@ Initialise the UART bus with the given parameters:
9393
* `stop` is the number of stop bits, `1 or 2`.
9494
* `timeout_chars` Rx timeout defined in number of characters. The value given here will be multiplied by the time a characters takes to be transmitted at the configured `baudrate`.
9595
* `pins` is a 4 or 2 item list indicating the TXD, RXD, RTS and CTS pins (in that order). Any of the pins can be `None` if one wants the UART to operate with limited functionality. If the RTS pin is given the the RX pin must be given as well. The same applies to CTS. When no pins are given, then the default set of TXD (P1) and RXD (P0) pins is taken, and hardware flow control will be disabled. If `pins=None`, no pin assignment will be made.
96+
* `rx_buffer_size` is the size of the buffer used for storing the RX packets. By default is is 512 bytes.
9697

9798
#### uart.deinit()
9899

0 commit comments

Comments
 (0)