Skip to content

Commit f24d06e

Browse files
committed
Add step motor interface
1 parent e71e534 commit f24d06e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

openfpgaduino.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ DEFINE_FUNCTION_HANDLE(ain_b);
178178
DEFINE_FUNCTION_HANDLE(am2301_temperature);
179179
DEFINE_FUNCTION_HANDLE(am2301_moisture);
180180
DEFINE_FUNCTION_HANDLE(steering);
181+
DEFINE_FUNCTION_HANDLE(stepmotor_init);
182+
DEFINE_FUNCTION_HANDLE(stepmotor);
181183
DEFINE_FUNCTION_HANDLE(sleep);
182184
DEFINE_FUNCTION_HANDLE(usleep);
183185

@@ -209,6 +211,8 @@ fun_table table[] = {
209211
DEFINE_FUNCTION(float,am2301_temperature,(int id)),
210212
DEFINE_FUNCTION(float,am2301_moisture,(int id)),
211213
DEFINE_FUNCTION(void,steering,(int id, int angle)),
214+
DEFINE_FUNCTION(void,stepmotor_init,(int id, unsigned int frequence, unsigned int duty_cycle, unsigned int delay)),
215+
DEFINE_FUNCTION(void,stepmotor,(int id, int forward_back, int step)),
212216
DEFINE_FUNCTION(unsigned int,sleep,(unsigned int seconds)),
213217
DEFINE_FUNCTION(int,usleep,(unsigned int useconds)),
214218
TABLE_NULL

0 commit comments

Comments
 (0)