mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-03 19:29:01 +00:00
maixbit: add chip datasheet link and reformat code
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
// +build maixbit
|
// +build maixbit
|
||||||
|
|
||||||
|
// Chip datasheet: https://s3.cn-north-1.amazonaws.com.cn/dl.kendryte.com/documents/kendryte_datasheet_20181011163248_en.pdf
|
||||||
|
|
||||||
package machine
|
package machine
|
||||||
|
|
||||||
// K210 IO pins.
|
// K210 IO pins.
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ func main() {
|
|||||||
initPLIC()
|
initPLIC()
|
||||||
|
|
||||||
// Only use one hart for the moment.
|
// Only use one hart for the moment.
|
||||||
if riscv.MHARTID.Get() == 0 {
|
if riscv.MHARTID.Get() != 0 {
|
||||||
|
abort()
|
||||||
|
}
|
||||||
|
|
||||||
// Reset all interrupt source priorities to zero.
|
// Reset all interrupt source priorities to zero.
|
||||||
for i := 0; i < kendryte.IRQ_max; i++ {
|
for i := 0; i < kendryte.IRQ_max; i++ {
|
||||||
@@ -47,9 +49,6 @@ func main() {
|
|||||||
initPeripherals()
|
initPeripherals()
|
||||||
run()
|
run()
|
||||||
abort()
|
abort()
|
||||||
} else {
|
|
||||||
abort()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func initPLIC() {
|
func initPLIC() {
|
||||||
|
|||||||
Reference in New Issue
Block a user