netlabtoolkit / VarSpeedServo

Arduino library for servos that extends the standard servo.h library with the ability to set speed, and wait for position to complete
GNU Lesser General Public License v2.1
291 stars 127 forks source link

add support for Raspberry Pico #47

Open peterwillcn opened 1 year ago

peterwillcn commented 1 year ago
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp: In function 'void handle_interrupts(timer16_Sequence_t, volatile uint16_t*, volatile uint16_t*)':
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:148:16: warning: conversion from 'unsigned int' to 'uint16_t' {aka 'short unsigned int'} changes value from '332500' to '4820' [-Woverflow]
  148 |       *OCRnA = (unsigned int)usToTicks(REFRESH_INTERVAL);
      |                ^
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp: At global scope:
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:158:8: error: expected constructor, destructor, or type conversion before '(' token
  158 | SIGNAL (TIMER1_COMPA_vect)
      |        ^
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp: In function 'void initISR(timer16_Sequence_t)':
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:206:5: error: 'TCCR1A' was not declared in this scope
  206 |     TCCR1A = 0;             // normal counting mode
      |     ^~~~~~
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:207:5: error: 'TCCR1B' was not declared in this scope
  207 |     TCCR1B = _BV(CS11);     // set prescaler of 8
      |     ^~~~~~
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:207:18: error: 'CS11' was not declared in this scope
  207 |     TCCR1B = _BV(CS11);     // set prescaler of 8
      |                  ^~~~
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:207:14: error: '_BV' was not declared in this scope
  207 |     TCCR1B = _BV(CS11);     // set prescaler of 8
      |              ^~~
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:208:5: error: 'TCNT1' was not declared in this scope
  208 |     TCNT1 = 0;              // clear the timer count
      |     ^~~~~
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:214:5: error: 'TIFR1' was not declared in this scope
  214 |     TIFR1 |= _BV(OCF1A);     // clear any pending interrupts;
      |     ^~~~~
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:214:18: error: 'OCF1A' was not declared in this scope
  214 |     TIFR1 |= _BV(OCF1A);     // clear any pending interrupts;
      |                  ^~~~~
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:215:5: error: 'TIMSK1' was not declared in this scope
  215 |     TIMSK1 |=  _BV(OCIE1A) ; // enable the output compare interrupt
      |     ^~~~~~
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:215:20: error: 'OCIE1A' was not declared in this scope
  215 |     TIMSK1 |=  _BV(OCIE1A) ; // enable the output compare interrupt
      |                    ^~~~~~
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp: In member function 'void VarSpeedServo::writeMicroseconds(int)':
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:374:23: error: 'SREG' was not declared in this scope
  374 |     uint8_t oldSREG = SREG;
      |                       ^~~~
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp: In member function 'void VarSpeedServo::write(int, uint8_t)':
/root/Arduino/libraries/VarSpeedServo/VarSpeedServo.cpp:422:22: error: 'SREG' was not declared in this scope
  422 |    uint8_t oldSREG = SREG;
      |                      ^~~~

Using library VarSpeedServo in folder: /root/Arduino/libraries/VarSpeedServo (legacy)
Using library Wire at version 1.0 in folder: /root/.arduino15/packages/rp2040/hardware/rp2040/3.1.1/libraries/Wire
Using library MPU6050 at version 0.6.0 in folder: /root/Arduino/libraries/MPU6050