Closed
Description
I am trying to create a struct that wraps around some volatile members. The code compiles, but the interrupt handlers do not seem to be able to access them as expected, aka nothing seems to happen.
I tried this initially:
//go:volatile
type volatileByte byte
type RingBuffer struct {
rxbuffer [bufferSize]volatileByte
head volatileByte
tail volatileByte
}
and also this
//go:volatile
type volatileByte byte
//go:volatile
type RingBuffer struct {
rxbuffer [bufferSize]volatileByte
head volatileByte
tail volatileByte
}
And also this
//go:volatile
type RingBuffer struct {
rxbuffer [bufferSize]byte
head byte
tail byte
}
They increased the size of my BIN file considerably, but did not work as expected.