To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 20747
20746  |  20748
Subject: 
Re: I2C interface
Newsgroups: 
lugnet.robotics
Date: 
Tue, 13 May 2003 21:17:54 GMT
Viewed: 
1591 times
  
Hi,

Change the declaration for set_motor to:

extern "C" void set_motor(unsigned char mask, unsigned char value);

and you should be fine.  And, yes, it's H8 asm code.  Probably could
have written it in C, but I tend to prefer asm for low-level type things.

HTH,

Mark

"Bastiaan van Kesteren" <b.van.kesteren53@zonnet.nl> wrote in message
news:HEuDJ3.HxM@lugnet.com...
Thanks for your answer!  However, I do have some questions about it..

First of all, I looked at the code you send in your post. looks nice, but • to be
honest, I don't know anything about assembly ( It is assembly, whats being • used
in the sub set_motor, right?)

Anyways, i first wanted to give it a try, before wondering how it works. • But it
doesn't work! When I compile my program, it says there are some undefined
references to sub_motor(unsigned char,unsigned char). So i started looking • for
assembly docs, and especially docs which describe how to use assembly in • C++. I
did learn some about assembly, but nothing about using it in C++.
So my question is: does anyone now some docs/tutorials which can get me
starting whit using assembly code in c++?? Becasue I do want to know how • this
piece of code works(and why I can't get it to work (-: )

-thanks alot,
bas.



Message is in Reply To:
  Re: I2C interface
 
Thanks for your answer! However, I do have some questions about it.. First of all, I looked at the code you send in your post. looks nice, but to be honest, I don't know anything about assembly ( It is assembly, whats being used in the sub (...) (22 years ago, 13-May-03, to lugnet.robotics)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Different Sensors Available...
13 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR