- Created _demo/embed/export/ with test for //export directive - Test verifies symbols are exported with correct names (LPSPI2_IRQHandler, SysTick_Handler) - Added CI workflow step to run the test - Essential for embedded development where hardware requires specific symbol names 🤖 Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
23 lines
331 B
Go
23 lines
331 B
Go
package main
|
|
|
|
//export LPSPI2_IRQHandler
|
|
func interruptLPSPI2() {
|
|
println("LPSPI2 interrupt handled")
|
|
}
|
|
|
|
//export SysTick_Handler
|
|
func systemTickHandler() {
|
|
println("System tick")
|
|
}
|
|
|
|
//export Add
|
|
func Add(a, b int) int {
|
|
return a + b
|
|
}
|
|
|
|
func main() {
|
|
interruptLPSPI2()
|
|
systemTickHandler()
|
|
println("Add(2, 3) =", Add(2, 3))
|
|
}
|