diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -1,3 +1,30 @@ +#include "stm32.h" + +void entry(); + +void* vectors[4] __attribute__((section(".vectors"))) = { + (void*)0x20004ffc, + (void*)entry + //(unsigned int *) STACK_TOP, // stack pointer + //(unsigned int *) main, // code entry point + //(unsigned int *) nmi_handler, // NMI handler (not really) + //(unsigned int *) hardfault_handler // hard fault handler (let's hope not) +}; + +volatile unsigned int cnt; + +int main() { + RCC.APB2ENR |= 0x5; + + GPIOA.CRL = 0x44344444; + GPIOA.ODR = 1 << 5; + + while(1) { + cnt++; + } +} + +/* #include "thread.h" #include "usbserial.h" #include "itg3200.h" @@ -153,7 +180,7 @@ class I2CThread : public BaseThread<I2CThread, 256> { acc.x, acc.y, acc.z, magn.x, magn.y, magn.z, int(q0 * 10000), int(q1 * 10000), int(q2 * 10000), int(q3 * 10000), - int(pitch * 10000), int(roll * 10000), int(yaw * 10000));*/ + int(pitch * 10000), int(roll * 10000), int(yaw * 10000));*//* int16_t pitch_angle_target = (ppmsum.data[1] - 500) * 8; int16_t roll_angle_target = (ppmsum.data[0] - 500) * 8; @@ -251,3 +278,4 @@ int main(void) { chThdSleepMilliseconds(1000); } } +*/
\ No newline at end of file |