mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 04:53:42 +00:00
Run Nick G's spellchecker github.com/client9/misspell, carefuly fix what it found (#4235)
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
// SoftDevice (s140v7) must be flashed first to enable use of bluetooth on this board.
|
||||
// See https://github.com/tinygo-org/bluetooth
|
||||
//
|
||||
// SoftDevice overwrites original bootloader and flashing method described above is not avalable anymore.
|
||||
// SoftDevice overwrites original bootloader and flashing method described above is not available anymore.
|
||||
// Instead, please use debug probe and flash your code with "nano-33-ble-s140v7" target.
|
||||
package machine
|
||||
|
||||
|
||||
@@ -1304,7 +1304,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
|
||||
return byte(spi.Bus.DATA.Get()), nil
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
@@ -1459,7 +1459,7 @@ func (tcc *TCC) Configure(config PWMConfig) error {
|
||||
for tcc.timer().SYNCBUSY.Get() != 0 {
|
||||
}
|
||||
|
||||
// Return any error that might have occured in the tcc.setPeriod call.
|
||||
// Return any error that might have occurred in the tcc.setPeriod call.
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1606,7 +1606,7 @@ func (tcc *TCC) Counter() uint32 {
|
||||
return tcc.timer().COUNT.Get()
|
||||
}
|
||||
|
||||
// Some constans to make pinTimerMapping below easier to read.
|
||||
// Some constants to make pinTimerMapping below easier to read.
|
||||
const (
|
||||
pinTCC0 = 1
|
||||
pinTCC1 = 2
|
||||
@@ -1759,7 +1759,7 @@ func (tcc *TCC) Set(channel uint8, value uint32) {
|
||||
}
|
||||
}
|
||||
|
||||
// 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.
|
||||
func EnterBootloader() {
|
||||
arm.DisableInterrupts()
|
||||
|
||||
@@ -1587,7 +1587,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
|
||||
return byte(spi.Bus.DATA.Get()), nil
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
@@ -1720,7 +1720,7 @@ func (tcc *TCC) Configure(config PWMConfig) error {
|
||||
for tcc.timer().SYNCBUSY.Get() != 0 {
|
||||
}
|
||||
|
||||
// Return any error that might have occured in the tcc.setPeriod call.
|
||||
// Return any error that might have occurred in the tcc.setPeriod call.
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ func (can *CAN) Configure(config CANConfig) error {
|
||||
}
|
||||
|
||||
// Callbacks to be called for CAN.SetInterrupt(). Wre're using the magic
|
||||
// constant 2 and 32 here beacuse th SAM E51/E54 has 2 CAN and 32 interrupt
|
||||
// constant 2 and 32 here because the SAM E51/E54 has 2 CAN and 32 interrupt
|
||||
// sources.
|
||||
var (
|
||||
canInstances [2]*CAN
|
||||
|
||||
@@ -460,7 +460,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
|
||||
return byte(spi.Bus.W0.Get()), nil
|
||||
}
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -312,7 +312,7 @@ func (uart *UART) configure(config UARTConfig, regs registerSet) error {
|
||||
|
||||
initUARTClock(uart.Bus, regs)
|
||||
|
||||
// - disbale TX/RX clock to make sure the UART transmitter or receiver is not at work during configuration
|
||||
// - disable TX/RX clock to make sure the UART transmitter or receiver is not at work during configuration
|
||||
uart.Bus.SetCLK_CONF_TX_SCLK_EN(0)
|
||||
uart.Bus.SetCLK_CONF_RX_SCLK_EN(0)
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
|
||||
return byte(spi.Bus.GetW0()), nil
|
||||
}
|
||||
|
||||
// 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.
|
||||
|
||||
@@ -66,7 +66,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
|
||||
return spiTransfer(spi.Bus, w), nil
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
|
||||
@@ -108,7 +108,7 @@ func (p Pin) Get() bool {
|
||||
func (p Pin) SetInterrupt(change PinChange, callback func(Pin)) error {
|
||||
// Some variables to easily check whether a channel was already configured
|
||||
// as an event channel for the given pin.
|
||||
// This is not just an optimization, this is requred: the datasheet says
|
||||
// This is not just an optimization, this is required: the datasheet says
|
||||
// that configuring more than one channel for a given pin results in
|
||||
// unpredictable behavior.
|
||||
expectedConfigMask := uint32(nrf.GPIOTE_CONFIG_MODE_Msk | nrf.GPIOTE_CONFIG_PSEL_Msk)
|
||||
|
||||
@@ -133,7 +133,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
|
||||
return byte(r), nil
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
|
||||
@@ -277,7 +277,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
|
||||
return buf[0], err
|
||||
}
|
||||
|
||||
// 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
|
||||
|
||||
@@ -348,7 +348,7 @@ func (i2c *I2C) tx(addr uint8, tx, rx []byte, timeout_us uint64) (err error) {
|
||||
}
|
||||
if abort || last {
|
||||
// If the transaction was aborted or if it completed
|
||||
// successfully wait until the STOP condition has occured.
|
||||
// successfully wait until the STOP condition has occurred.
|
||||
|
||||
// TODO Could there be an abort while waiting for the STOP
|
||||
// condition here? If so, additional code would be needed here
|
||||
|
||||
@@ -48,7 +48,7 @@ type SPI struct {
|
||||
Bus *rp.SPI0_Type
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
|
||||
@@ -23,7 +23,7 @@ const APB2_TIM_FREQ = 110e6 // 110MHz
|
||||
// Configure the UART.
|
||||
func (uart *UART) configurePins(config UARTConfig) {
|
||||
if config.RX.getPort() == stm32.GPIOG || config.TX.getPort() == stm32.GPIOG {
|
||||
// Enable VDDIO2 power supply, which is an independant power supply for the PGx pins
|
||||
// Enable VDDIO2 power supply, which is an independent power supply for the PGx pins
|
||||
stm32.PWR.CR2.SetBits(stm32.PWR_CR2_IOSV)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
package machine
|
||||
|
||||
// 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.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user