次のように関数に渡されるポインターがあります。
unsigned char globalvar;
int functionexp(unsigned char *buff){
globalvar = buff;
//start interrupt
//wait for end of interrupt
//pass original pointer back with updated results
}
void __attribute__((interrupt, no_auto_psv)) _DMA2Interrupt(void) {
globalvar = somedata;
}
そして、上記のポインターに渡す必要があるデータを収集する割り込みがあります。私がしたいのは、グローバルダミー変数を作成し、元のポインター (bufF) アドレスをこのグローバル変数にコピーすることです。そのため、割り込み内でアクセスできるグローバル変数にデータを書き込むとき (元のポインターを渡すことができないため)元のポインタの値も更新します。
私の例は、私がやりたいことの基礎を示していますが、ポインター構文はありません。誰かがこれを行う方法を教えてください。