Skip to content

Commit

Permalink
re-generated by skipping targets with sanity check errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2thomas committed Jan 7, 2024
1 parent 0cbcfde commit df828c1
Show file tree
Hide file tree
Showing 35 changed files with 1,573 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Arduino Mega 1280"
weight: 3
---

The [Arduino Mega 1280](https://www.arduino.cc/en/Main/arduinoBoardMega/) is based on the AVR [ATmega1280](https://www.microchip.com/wwwproducts/en/ATMEGA1280) microcontroller.
The [Arduino Mega 1280](https://docs.arduino.cc/retired/other/arduino-older-boards#arduino-mega/) is based on the AVR [ATmega1280](https://www.microchip.com/wwwproducts/en/ATMEGA1280) microcontroller.

Note: the AVR backend of LLVM is still experimental so you may encounter bugs.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/reference/microcontrollers/bluepill.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'ST Micro STM32F103XX "Bluepill"'
weight: 3
---

The [Bluepill](http://wiki.stm32duino.com/index.php?title=Blue_Pill) is a popular, ultra-cheap and compact ARM development board based on the ST Micro [STM32F103C8](https://www.st.com/en/microcontrollers/stm32f103c8.html) SoC.
The [Bluepill](https://stm32-base.org/boards/STM32F103C8T6-Blue-Pill.html) is a popular, ultra-cheap and compact ARM development board based on the ST Micro [STM32F103C8](https://www.st.com/en/microcontrollers/stm32f103c8.html) SoC.

## Interfaces

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,6 @@ var (



```go
var I2C0 *I2C = nil
```

I2C0 is the only I2C interface on most AVRs.


```go
var DefaultUART = UART0
```
Expand Down Expand Up @@ -496,6 +489,18 @@ value of each parameter will use the peripheral's default settings.

```go
type I2C struct {
srReg *volatile.Register8
brReg *volatile.Register8
crReg *volatile.Register8
drReg *volatile.Register8

srPS0 byte
srPS1 byte
crEN byte
crINT byte
crSTO byte
crEA byte
crSTA byte
}
```

Expand Down Expand Up @@ -526,6 +531,15 @@ is a shortcut to easily read such registers. Also, it only works for devices
with 7-bit addresses, which is the vast majority.


### func (*I2C) SetBaudRate

```go
func (i2c *I2C) SetBaudRate(br uint32) error
```

SetBaudRate sets the communication speed for I2C.


### func (*I2C) Tx

```go
Expand Down Expand Up @@ -1003,6 +1017,17 @@ type SPI struct {
spdr *volatile.Register8
spsr *volatile.Register8

spcrR0 byte
spcrR1 byte
spcrCPHA byte
spcrCPOL byte
spcrDORD byte
spcrSPE byte
spcrMSTR byte

spsrI2X byte
spsrSPIF byte

// The io pins for the SPIx port set by the chip
sck Pin
sdi Pin
Expand Down Expand Up @@ -1150,7 +1175,8 @@ Usually called by the IRQ handler for a machine.
func (uart *UART) Write(data []byte) (n int, err error)
```

Write data to the UART.
Write data over the UART's Tx.
This function blocks until the data is finished being sent.


### func (*UART) WriteByte
Expand All @@ -1159,7 +1185,8 @@ Write data to the UART.
func (uart *UART) WriteByte(c byte) error
```

WriteByte writes a byte of data to the UART.
WriteByte writes a byte of data over the UART's Tx.
This function blocks until the data is finished being sent.



Expand All @@ -1171,6 +1198,8 @@ type UARTConfig struct {
BaudRate uint32
TX Pin
RX Pin
RTS Pin
CTS Pin
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,6 @@ var (



```go
var I2C0 *I2C = nil
```

I2C0 is the only I2C interface on most AVRs.


```go
var DefaultUART = UART0
```
Expand Down Expand Up @@ -541,6 +534,18 @@ value of each parameter will use the peripheral's default settings.

```go
type I2C struct {
srReg *volatile.Register8
brReg *volatile.Register8
crReg *volatile.Register8
drReg *volatile.Register8

srPS0 byte
srPS1 byte
crEN byte
crINT byte
crSTO byte
crEA byte
crSTA byte
}
```

Expand Down Expand Up @@ -571,6 +576,15 @@ is a shortcut to easily read such registers. Also, it only works for devices
with 7-bit addresses, which is the vast majority.


### func (*I2C) SetBaudRate

```go
func (i2c *I2C) SetBaudRate(br uint32) error
```

SetBaudRate sets the communication speed for I2C.


### func (*I2C) Tx

```go
Expand Down Expand Up @@ -918,6 +932,17 @@ type SPI struct {
spdr *volatile.Register8
spsr *volatile.Register8

spcrR0 byte
spcrR1 byte
spcrCPHA byte
spcrCPOL byte
spcrDORD byte
spcrSPE byte
spcrMSTR byte

spsrI2X byte
spsrSPIF byte

// The io pins for the SPIx port set by the chip
sck Pin
sdi Pin
Expand Down Expand Up @@ -1065,7 +1090,8 @@ Usually called by the IRQ handler for a machine.
func (uart *UART) Write(data []byte) (n int, err error)
```

Write data to the UART.
Write data over the UART's Tx.
This function blocks until the data is finished being sent.


### func (*UART) WriteByte
Expand All @@ -1074,7 +1100,8 @@ Write data to the UART.
func (uart *UART) WriteByte(c byte) error
```

WriteByte writes a byte of data to the UART.
WriteByte writes a byte of data over the UART's Tx.
This function blocks until the data is finished being sent.



Expand All @@ -1086,6 +1113,8 @@ type UARTConfig struct {
BaudRate uint32
TX Pin
RX Pin
RTS Pin
CTS Pin
}
```

Expand Down
111 changes: 101 additions & 10 deletions content/docs/reference/microcontrollers/machine/arduino-nano.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ NoPin explicitly indicates "not a pin". Use this pin if you want to leave one
of the pins in a peripheral unconfigured (if supported by the hardware).


```go
const (
PinRising PinChange = 1 << iota
PinFalling
PinToggle = PinRising | PinFalling
)
```



```go
const (
PinInput PinMode = iota
Expand Down Expand Up @@ -223,13 +233,6 @@ var (



```go
var I2C0 *I2C = nil
```

I2C0 is the only I2C interface on most AVRs.


```go
var DefaultUART = UART0
```
Expand Down Expand Up @@ -267,15 +270,47 @@ var (



```go
var I2C0 = &I2C{
srReg: avr.TWSR,
brReg: avr.TWBR,
crReg: avr.TWCR,
drReg: avr.TWDR,
srPS0: avr.TWSR_TWPS0,
srPS1: avr.TWSR_TWPS1,
crEN: avr.TWCR_TWEN,
crINT: avr.TWCR_TWINT,
crSTO: avr.TWCR_TWSTO,
crEA: avr.TWCR_TWEA,
crSTA: avr.TWCR_TWSTA,
}
```

I2C0 is the only I2C interface on most AVRs.


```go
var SPI0 = SPI{
spcr: avr.SPCR,
spdr: avr.SPDR,
spsr: avr.SPSR,

spcrR0: avr.SPCR_SPR0,
spcrR1: avr.SPCR_SPR1,
spcrCPHA: avr.SPCR_CPHA,
spcrCPOL: avr.SPCR_CPOL,
spcrDORD: avr.SPCR_DORD,
spcrSPE: avr.SPCR_SPE,
spcrMSTR: avr.SPCR_MSTR,

spsrI2X: avr.SPSR_SPI2X,
spsrSPIF: avr.SPSR_SPIF,

sck: PB5,
sdo: PB3,
sdi: PB4,
cs: PB2}
cs: PB2,
}
```

SPI configuration
Expand Down Expand Up @@ -399,6 +434,18 @@ value of each parameter will use the peripheral's default settings.

```go
type I2C struct {
srReg *volatile.Register8
brReg *volatile.Register8
crReg *volatile.Register8
drReg *volatile.Register8

srPS0 byte
srPS1 byte
crEN byte
crINT byte
crSTO byte
crEA byte
crSTA byte
}
```

Expand Down Expand Up @@ -429,6 +476,15 @@ is a shortcut to easily read such registers. Also, it only works for devices
with 7-bit addresses, which is the vast majority.


### func (*I2C) SetBaudRate

```go
func (i2c *I2C) SetBaudRate(br uint32) error
```

SetBaudRate sets the communication speed for I2C.


### func (*I2C) Tx

```go
Expand Down Expand Up @@ -813,6 +869,26 @@ func (p Pin) Set(value bool)
Set changes the value of the GPIO pin. The pin must be configured as output.


### func (Pin) SetInterrupt

```go
func (pin Pin) SetInterrupt(pinChange PinChange, callback func(Pin)) (err error)
```





## type PinChange

```go
type PinChange uint8
```

Pin Change Interrupts





## type PinConfig
Expand Down Expand Up @@ -906,6 +982,17 @@ type SPI struct {
spdr *volatile.Register8
spsr *volatile.Register8

spcrR0 byte
spcrR1 byte
spcrCPHA byte
spcrCPOL byte
spcrDORD byte
spcrSPE byte
spcrMSTR byte

spsrI2X byte
spsrSPIF byte

// The io pins for the SPIx port set by the chip
sck Pin
sdi Pin
Expand Down Expand Up @@ -1053,7 +1140,8 @@ Usually called by the IRQ handler for a machine.
func (uart *UART) Write(data []byte) (n int, err error)
```

Write data to the UART.
Write data over the UART's Tx.
This function blocks until the data is finished being sent.


### func (*UART) WriteByte
Expand All @@ -1062,7 +1150,8 @@ Write data to the UART.
func (uart *UART) WriteByte(c byte) error
```

WriteByte writes a byte of data to the UART.
WriteByte writes a byte of data over the UART's Tx.
This function blocks until the data is finished being sent.



Expand All @@ -1074,6 +1163,8 @@ type UARTConfig struct {
BaudRate uint32
TX Pin
RX Pin
RTS Pin
CTS Pin
}
```

Expand Down
Loading

0 comments on commit df828c1

Please sign in to comment.