Skip to content

Commit aee6189

Browse files
authored
Merge pull request #35 from ROBOTIS-GIT/develop
merge from develop
2 parents 22167e0 + 1c03e71 commit aee6189

File tree

1,410 files changed

+434903
-15319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,410 files changed

+434903
-15319
lines changed

arduino/opencr_arduino/opencr/.cproject

-166
This file was deleted.

arduino/opencr_arduino/opencr/.settings/language.settings.xml

-15
This file was deleted.

arduino/opencr_arduino/opencr/.settings/org.eclipse.ltk.core.refactoring.prefs

-2
This file was deleted.

arduino/opencr_arduino/opencr/Makefile

-106
This file was deleted.

arduino/opencr_arduino/opencr/boards.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ OpenCR.upload.params.quiet=no
1818
OpenCR.build.mcu=cortex-m7
1919
OpenCR.build.f_cpu=216000000L
2020
OpenCR.build.board=OpenCR
21-
OpenCR.build.core=mapleMX
22-
OpenCR.build.common_flags=-mthumb -DSTM32F746xx -D__OPENCR__
21+
OpenCR.build.core=arduino
22+
OpenCR.build.common_flags=-mthumb -DSTM32F746xx -D__OPENCR__
2323

24-
OpenCR.build.ldscript=bsp/opencr/ld/opencr_flash.ld
24+
OpenCR.build.ldscript=bsp/opencr/ldscript/opencr_flash.ld
2525
OpenCR.build.variant=OpenCR
2626
OpenCR.build.variant_system_lib=lib_f746.a
2727
OpenCR.build.extra_flags=
2828

2929

30-
OpenCR.build.inc1=src
31-
OpenCR.build.inc2=bsp/opencr
32-
OpenCR.build.inc3=bsp/opencr/include
33-
OpenCR.build.inc4=bsp/opencr/cfg
34-
OpenCR.build.inc5=hal
30+
OpenCR.build.inc1=bsp/opencr
31+
OpenCR.build.inc2=bsp/opencr/include
32+
OpenCR.build.inc3=hw
33+
OpenCR.build.inc4=hw/driver
34+
OpenCR.build.inc5=hw/usb_cdc
3535
OpenCR.build.inc6=lib/STM32F7xx_HAL_Driver/Inc/
3636
OpenCR.build.inc7=
3737

arduino/opencr_arduino/opencr/cores/mapleMX/Arduino.h arduino/opencr_arduino/opencr/cores/arduino/Arduino.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
#include <avr/interrupt.h>
3434

3535
#include "binary.h"
36-
#include "hal.h"
37-
#include "drv.h"
36+
#include "hw.h"
3837
#include "itoa.h"
3938

4039
#ifdef __cplusplus

arduino/opencr_arduino/opencr/cores/mapleMX/HardwareSerial.h arduino/opencr_arduino/opencr/cores/arduino/HardwareSerial.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
class HardwareSerial : public Stream
2727
{
2828
public:
29-
virtual void begin(unsigned long);
30-
virtual void end();
29+
virtual void begin(unsigned long) = 0;
30+
virtual void end() = 0;
3131
virtual int available(void) = 0;
3232
virtual int peek(void) = 0;
3333
virtual int read(void) = 0;

arduino/opencr_arduino/opencr/cores/mapleMX/HardwareTimer.cpp arduino/opencr_arduino/opencr/cores/arduino/HardwareTimer.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <chip.h>
2828

2929
#include <USBSerial.h>
30+
#include "drv_timer.h"
3031
#include "variant.h"
3132
#include "HardwareTimer.h"
3233

arduino/opencr_arduino/opencr/cores/mapleMX/HardwareTimer.h arduino/opencr_arduino/opencr/cores/arduino/HardwareTimer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#define _HARDWARETIMER_H_
3030

3131
#include <inttypes.h>
32-
#include "drv_timer.h"
32+
3333

3434

3535

@@ -43,7 +43,7 @@ class HardwareTimer {
4343
void pause(void);
4444
void resume(void);
4545
void stop(void);
46-
void start(void);
46+
void start(void);
4747
uint16_t setPeriod(uint32_t microseconds);
4848
void attachInterrupt(voidFuncPtr handler);
4949
void detachInterrupt(void);

arduino/opencr_arduino/opencr/cores/mapleMX/itoa.c arduino/opencr_arduino/opencr/cores/arduino/itoa.c

+4-46
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
This library is distributed in the hope that it will be useful,
1010
but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1212
See the GNU Lesser General Public License for more details.
1313
1414
You should have received a copy of the GNU Lesser General Public
@@ -23,48 +23,6 @@
2323
extern "C"{
2424
#endif // __cplusplus
2525

26-
#if 0
27-
/* reverse: reverse string s in place */
28-
static void reverse( char s[] )
29-
{
30-
int i, j ;
31-
char c ;
32-
33-
for ( i = 0, j = strlen(s)-1 ; i < j ; i++, j-- )
34-
{
35-
c = s[i] ;
36-
s[i] = s[j] ;
37-
s[j] = c ;
38-
}
39-
}
40-
41-
/* itoa: convert n to characters in s */
42-
extern void itoa( int n, char s[] )
43-
{
44-
int i, sign ;
45-
46-
if ( (sign = n) < 0 ) /* record sign */
47-
{
48-
n = -n; /* make n positive */
49-
}
50-
51-
i = 0;
52-
do
53-
{ /* generate digits in reverse order */
54-
s[i++] = n % 10 + '0'; /* get next digit */
55-
} while ((n /= 10) > 0) ; /* delete it */
56-
57-
if (sign < 0 )
58-
{
59-
s[i++] = '-';
60-
}
61-
62-
s[i] = '\0';
63-
64-
reverse( s ) ;
65-
}
66-
67-
#else
6826

6927
extern char* itoa( int value, char *string, int radix )
7028
{
@@ -143,7 +101,7 @@ extern char* ultoa( unsigned long value, char *string, int radix )
143101
{
144102
return 0;
145103
}
146-
104+
147105
while (v || tp == tmp)
148106
{
149107
i = v % radix;
@@ -156,14 +114,14 @@ extern char* ultoa( unsigned long value, char *string, int radix )
156114

157115
sp = string;
158116

159-
117+
160118
while (tp > tmp)
161119
*sp++ = *--tp;
162120
*sp = 0;
163121

164122
return string;
165123
}
166-
#endif /* 0 */
124+
167125

168126
#ifdef __cplusplus
169127
} // extern "C"

arduino/opencr_arduino/opencr/cores/mapleMX/wiring.c arduino/opencr_arduino/opencr/cores/arduino/wiring.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
#include "Arduino.h"
20-
20+
#include "drv_micros.h"
2121
#ifdef __cplusplus
2222
extern "C" {
2323
#endif

arduino/opencr_arduino/opencr/libraries/DynamixelSDK/src/dynamixel_sdk_opencr/port_handler_opencr.cpp

+1-17
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,6 @@ void PortHandlerOpenCR::closePort()
7373
void PortHandlerOpenCR::clearPort()
7474
{
7575
DYNAMIXEL_SERIAL.flush();
76-
// double tTime;
77-
//
78-
// tTime = getCurrentTime();
79-
// while(1)
80-
// {
81-
// if (DYNAMIXEL_SERIAL.available())
82-
// {
83-
// DYNAMIXEL_SERIAL.read();
84-
// }
85-
// else
86-
// {
87-
// break;
88-
// }
89-
//
90-
// if (getCurrentTime() - tTime > 1000)
91-
// break;
92-
// }
9376
}
9477

9578
void PortHandlerOpenCR::setPortName(const char *port_name)
@@ -176,6 +159,7 @@ bool PortHandlerOpenCR::isPacketTimeout()
176159
packet_timeout_ = 0;
177160
return true;
178161
}
162+
179163
return false;
180164
}
181165

0 commit comments

Comments
 (0)