mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 23:43:40 +00:00
nrf52840: implement USB-CDC (#883)
* machine/nrf52840: usb-cdc implementation
This commit is contained in:
@@ -66,8 +66,8 @@ type UART struct {
|
||||
|
||||
// UART
|
||||
var (
|
||||
// UART0 is the hardware serial port on the NRF.
|
||||
UART0 = UART{Buffer: NewRingBuffer()}
|
||||
// NRF_UART0 is the hardware UART on the NRF SoC.
|
||||
NRF_UART0 = UART{Buffer: NewRingBuffer()}
|
||||
)
|
||||
|
||||
// Configure the UART.
|
||||
@@ -88,7 +88,7 @@ func (uart UART) Configure(config UARTConfig) {
|
||||
nrf.UART0.INTENSET.Set(nrf.UART_INTENSET_RXDRDY_Msk)
|
||||
|
||||
// Enable RX IRQ.
|
||||
intr := interrupt.New(nrf.IRQ_UART0, UART0.handleInterrupt)
|
||||
intr := interrupt.New(nrf.IRQ_UART0, NRF_UART0.handleInterrupt)
|
||||
intr.SetPriority(0xc0) // low priority
|
||||
intr.Enable()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user