The solution was to tell gcc it is a function with .type logic_sample_fast, %function
So the whole function looks like this:
.syntax unified .cpu cortex-m3 .thumb .data .align 4 #define FIO0PIN (0x2009c014) #define FIO1PIN (0x2009c034) #define LOGIC_IN_FIOPIN_REG FIO1PIN .global logic_sample_fast .type logic_sample_fast, %function .thumb_func logic_sample_fast: movw r1, :lower16:LOGIC_IN_FIOPIN_REG movt r1, :upper16:LOGIC_IN_FIOPIN_REG cpsid i trig0: ldrb r2, [r1] ands r3, r2, #1 bne trig0 trig1: ldrb r2, [r1] ands r3, r2, #1 beq trig1 .rept (40*8) ldrb r2, [r1] strb r2, [r0], #1 .endr cpsie i bx lrAnd the definition in C like this:
void logic_sample_fast(uint8_t *buffer);
Inga kommentarer:
Skicka en kommentar