mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 06:53:40 +00:00
avr: add atmega1284 chip support
Not tested on actual hardware, only on simavr. The main motivation for adding this chip is to be able to run simulated tests using a much larger memory space (16kB RAM, 128kB flash) without jumping to the XMega devices that may not be as well supported by LLVM.
This commit is contained in:
committed by
Ron Evans
parent
66afcb3b39
commit
5089d1a5a7
@@ -234,7 +234,7 @@ func (uart UART) Configure(config UARTConfig) {
|
||||
}
|
||||
|
||||
// Register the UART interrupt.
|
||||
interrupt.New(avr.IRQ_USART_RX, func(intr interrupt.Interrupt) {
|
||||
interrupt.New(irq_USART0_RX, func(intr interrupt.Interrupt) {
|
||||
// Read register to clear it.
|
||||
data := avr.UDR0.Get()
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// +build avr,atmega1284p
|
||||
|
||||
package machine
|
||||
|
||||
import "device/avr"
|
||||
|
||||
const irq_USART0_RX = avr.IRQ_USART0_RX
|
||||
|
||||
// Return the current CPU frequency in hertz.
|
||||
func CPUFrequency() uint32 {
|
||||
return 20000000
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// +build avr,atmega328p
|
||||
|
||||
package machine
|
||||
|
||||
import "device/avr"
|
||||
|
||||
const irq_USART0_RX = avr.IRQ_USART_RX
|
||||
Reference in New Issue
Block a user