Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #418

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/docs/concepts/compiler-internals/harvard-arch.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ weight: 10

The AVR architecture is a modified Harvard architecture, which means that flash and RAM live in different address spaces. In practice, this means that any given pointer may either point to RAM or flash, but this is not visible from the pointer itself.

To get TinyGo to work on the Arduino, which uses the AVR architecutre, all global variables (which include string constants!) are marked non-constant and thus are stored in RAM and all pointer dereferences assume that pointers point to RAM. At some point this should be optimized so that obviously constant data is kept in read-only memory but this optimization has not yet been implemented.
To get TinyGo to work on the Arduino, which uses the AVR architecture, all global variables (which include string constants!) are marked non-constant and thus are stored in RAM and all pointer dereferences assume that pointers point to RAM. At some point this should be optimized so that obviously constant data is kept in read-only memory but this optimization has not yet been implemented.
6 changes: 3 additions & 3 deletions content/docs/concepts/low-power.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: >
---

Microcontrollers are usually rather non-demanding when it comes to power consumption.
Couple hudreds mW is the most you may expect a hobby project would use.
Couple hundreds mW is the most you may expect a hobby project would use.

Sometimes, even that is not low enough.
Power your project from a battery, and it'd benefit greatly from consuming less.
Expand All @@ -17,15 +17,15 @@ Common scenario for such projects is sleeping most of the time, and only rarely
The main caveat here is if not configured properly, microcontroller and peripherals continue to consume power while your program "sleeps".

The standard way to pause execution in Go is to use `time.Sleep()` function that is available in TinyGo too. Depending on the chip and effort put into its support, the efficiency of this function may vary. The only thing certain: this is _not worse_ than busy looping until a certain time has passed.
Still, with such high-level function as `time.Sleep()` it is not always possible to disable everything that consumes power as the decisions may depend on the application, presense of peripherals and the board used.
Still, with such high-level function as `time.Sleep()` it is not always possible to disable everything that consumes power as the decisions may depend on the application, presence of peripherals and the board used.

Most microcontrollers have one or more "low power" modes, also known as "deep sleep" and, sometimes, "dormant".
In such modes microcontroller may consume as low as milli- or even micro-Watts.
TinyGo gives you low level access to hardware to try and make most of it.

## Implementations

Manufacturers implement different modes, depending of capabilites of their products and name these modes differently too.
Manufacturers implement different modes, depending of capabilities of their products and name these modes differently too.
Hence no naming consistency across microcontrollers, unfortunately.

Always consult "Power consumption" part of a respective datasheet to understand capabilities of your hardware.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/contributing/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Here is how to contribute back some code or documentation:
- Submit a pull request against the `dev` branch.
- Be kind

Please rebase (not merge) from the dev branch if your PR needs to incorporate changes that occured after your feature branch was created. You can accomplish that via the git command line:
Please rebase (not merge) from the dev branch if your PR needs to incorporate changes that occurred after your feature branch was created. You can accomplish that via the git command line:

```
git checkout dev
Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/contributing/organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The `GOROOT` directory in TinyGo is actually a constructed GOROOT, cached and re

These replaced (or added) packages live in the src subdirectory:

- `src/runtime`: the replacement runtime package that contains the things you would expect of a runtime package. It implements a heap with a garbage collector, a scheduler for goroutines, channels, and perhaps less obviously: it contains various things that are not implemented in the compiler like maps, the slice `append` built-in, and various other language features. It also implements a few device specific things, namely: runtime initialization and timers (used by the time packkage). These last two are device specific and need to be implemented per device.
- `src/runtime`: the replacement runtime package that contains the things you would expect of a runtime package. It implements a heap with a garbage collector, a scheduler for goroutines, channels, and perhaps less obviously: it contains various things that are not implemented in the compiler like maps, the slice `append` built-in, and various other language features. It also implements a few device specific things, namely: runtime initialization and timers (used by the time package). These last two are device specific and need to be implemented per device.
- `src/device`: contains hardware register access (memory-mapped I/O) without abstractions. Most of the subpackages are automatically generated. These packages are only used for baremetal programming.
- `src/machine`: contains a hardware abstraction layer for chips. You could think of this as the equivalent of the `os` package: it provides portable APIs for common hardware peripherals. For example, every chip vendor implements [I2C]({{<ref "i2c.md">}}) differently but the machine package wraps this in a single `*machine.I2C` type that has the same interface on any supported chip. For more information, see the [machine package doucumentation]({{<ref "../../reference/machine.md">}})

Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ There is a variety of choice when it comes to debug probes, but most debug probe
Here are some debug probes that are known to work in TinyGo for at least some boards:

* [SEGGER J-Link Edu Mini](https://www.segger.com/products/debug-probes/j-link/models/j-link-edu-mini/): this debugger can debug pretty much all ARM Cortex-M chips and is generally very reliable. However, it comes with some possible issues: it's entirely closed source, it is only allowed to be used for non-commercial purposes and it doesn't support as many chips as the full version.
* [Particle Debugger](https://store.particle.io/products/particle-debugger): a [DAPLink](https://armmbed.github.io/DAPLink/) based debugger that can debug practially all ARM Cortex-M chips (like the SEGGER above) and does not have limitations on how it can be used. It is also open source. While this debugger is designed for Particle hardware it can easily handle chips from other vendors.
* [Particle Debugger](https://store.particle.io/products/particle-debugger): a [DAPLink](https://armmbed.github.io/DAPLink/) based debugger that can debug practically all ARM Cortex-M chips (like the SEGGER above) and does not have limitations on how it can be used. It is also open source. While this debugger is designed for Particle hardware it can easily handle chips from other vendors.
* [ST-Link v2](https://www.st.com/en/development-tools/st-link-v2.html): a debugger often included on boards from STMicroelectronics and also sold separately. It is somewhat less powerful than some other debuggers as it is only intended to be used with ST hardware, even though it works with most microcontrollers that support SWD debugging. Note that many online stores sell counterfeit versions of this debugger that may be unreliable.
* [DIY DAPLink](https://embeddedcomputing.weebly.com/the-5-programmer-debugger.html): a debugger you can make yourself. Requires compatible board, for example [Seeeduino XIAO](https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html) that costs about $5. Please see linked page for flashing and wiring instructions. For quick and easy start, it is possible to [download uf2 image](http://files.seeedstudio.com/wiki/Seeeduino-XIAO/res/simple_daplink_xiao.uf2) and flash it by simply copying it over to XIAO mounted as an external drive. Members of TinyGo community reported successfully using this method to debug XIAO and Arduino Nano 33 IoT boards.
* [DYI Picoprobe](https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html#debugging-using-another-raspberry-pi-pico): Is another DIY opensource tool for the Raspberry Pi Pico. It acts as a Serial Wire Debugger (SWD) and UART to usb converter. The Raspberry Pi Pico getting started guide Appendix A page 60 has [instructions to build](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf) from [source](https://github.com/raspberrypi/picoprobe) or you can download and flash the [UF2 image](https://datasheets.raspberrypi.com/soft/picoprobe.uf2).
Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/ide-integration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Now you need to configure your IDE with these values.

### Using tinygo-edit

There is a CLI tool called [tinygo-edit](https://github.com/sago35/tinygo-edit) you can use it to Gather the needed build flags and starting the editor using the correct environment variables. Using the CLI you don't need to do the steps manualy.
There is a CLI tool called [tinygo-edit](https://github.com/sago35/tinygo-edit) you can use it to Gather the needed build flags and starting the editor using the correct environment variables. Using the CLI you don't need to do the steps manually.

### Using an alias

Expand Down
2 changes: 1 addition & 1 deletion content/docs/guides/tips-n-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (t *MyType) SomeMethod() {
}
```

You may even find yourself having two or more slices pointing at diferent regions of the same array simultaneously, if you are careful.
You may even find yourself having two or more slices pointing at different regions of the same array simultaneously, if you are careful.

```
buf1 := t.buf[:2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ Transfer writes the byte into the register and returns the read content
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ Transfer writes the byte into the register and returns the read content
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ func EnableCDC(txHandler func(), rxHandler func([]byte), setupHandler func(usb.S
func EnterBootloader()
```

EnterBootloader should perform a system reset in preperation
EnterBootloader should perform a system reset in preparation
to switch to the bootloader to flash new firmware.


Expand Down Expand Up @@ -1292,7 +1292,7 @@ Transfer writes/reads a single byte using the SPI interface.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ func EnableCDC(txHandler func(), rxHandler func([]byte), setupHandler func(usb.S
func EnterBootloader()
```

EnterBootloader should perform a system reset in preperation
EnterBootloader should perform a system reset in preparation
to switch to the bootloader to flash new firmware.


Expand Down Expand Up @@ -1345,7 +1345,7 @@ Transfer writes/reads a single byte using the SPI interface.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ Transfer writes the byte into the register and returns the read content
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ func EnableCDC(txHandler func(), rxHandler func([]byte), setupHandler func(usb.S
func EnterBootloader()
```

EnterBootloader should perform a system reset in preperation
EnterBootloader should perform a system reset in preparation
to switch to the bootloader to flash new firmware.


Expand Down Expand Up @@ -1368,7 +1368,7 @@ Transfer writes/reads a single byte using the SPI interface.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ func EnableCDC(txHandler func(), rxHandler func([]byte), setupHandler func(usb.S
func EnterBootloader()
```

EnterBootloader should perform a system reset in preperation
EnterBootloader should perform a system reset in preparation
to switch to the bootloader to flash new firmware.


Expand Down Expand Up @@ -1320,7 +1320,7 @@ Transfer writes/reads a single byte using the SPI interface.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/reference/microcontrollers/machine/arduino.md
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ Transfer writes the byte into the register and returns the read content
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,7 @@ Transfer writes/reads a single byte using the SPI interface.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ Write a single byte and read a single byte from TX/RX FIFO.
func (spi SPI) Tx(w, r []byte) (err error)
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ Transfer writes/reads a single byte using the SPI interface.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ Write a single byte and read a single byte from TX/RX FIFO.
func (spi SPI) Tx(w, r []byte) (err error)
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ Transfer writes/reads a single byte using the SPI interface.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous
Tx handles read/write operation for SPI interface. Since SPI is a synchronous
write/read interface, there must always be the same number of bytes written
as bytes read. Therefore, if the number of bytes don't match it will be
padded until they fit: if len(w) > len(r) the extra bytes received will be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ func EnableCDC(txHandler func(), rxHandler func([]byte), setupHandler func(usb.S
func EnterBootloader()
```

EnterBootloader should perform a system reset in preperation
EnterBootloader should perform a system reset in preparation
to switch to the bootloader to flash new firmware.


Expand Down Expand Up @@ -1335,7 +1335,7 @@ Transfer writes/reads a single byte using the SPI interface.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/reference/microcontrollers/machine/clue.md
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ Transfer writes/reads a single byte using the SPI interface.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous
Tx handles read/write operation for SPI interface. Since SPI is a synchronous
write/read interface, there must always be the same number of bytes written
as bytes read. Therefore, if the number of bytes don't match it will be
padded until they fit: if len(w) > len(r) the extra bytes received will be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ transfer larger amounts of data, Tx will be faster.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
This is accomplished by sending zero bits if r is bigger than w or discarding
the incoming data if w is bigger than r.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ transfer larger amounts of data, Tx will be faster.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
This is accomplished by sending zero bits if r is bigger than w or discarding
the incoming data if w is bigger than r.
Expand Down
4 changes: 2 additions & 2 deletions content/docs/reference/microcontrollers/machine/feather-m0.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ func EnableCDC(txHandler func(), rxHandler func([]byte), setupHandler func(usb.S
func EnterBootloader()
```

EnterBootloader should perform a system reset in preperation
EnterBootloader should perform a system reset in preparation
to switch to the bootloader to flash new firmware.


Expand Down Expand Up @@ -1317,7 +1317,7 @@ Transfer writes/reads a single byte using the SPI interface.
func (spi SPI) Tx(w, r []byte) error
```

Tx handles read/write operation for SPI interface. Since SPI is a syncronous write/read
Tx handles read/write operation for SPI interface. Since SPI is a synchronous write/read
interface, there must always be the same number of bytes written as bytes read.
The Tx method knows about this, and offers a few different ways of calling it.

Expand Down
Loading