Shop OBEX P1 Docs P2 Docs Learn Events
Full Duplex Use from lower object file — Parallax Forums

Full Duplex Use from lower object file

James LongJames Long Posts: 1,181
edited 2007-02-28 00:49 in Propeller 1
Ok....so I have a daughter object·initializing the full duplex object and it sends information through the serial communication.

Can my top object file use the recieve end of the full duplex? I know not to reinitialize it.....but I want to make sure I can use the object without causing problems with my lower object.

I don't see a reason this would cause problems.....but I thought I would check first.

James L

Comments

  • rokickirokicki Posts: 1,000
    edited 2007-02-27 23:25
    It will only work if there are no vars. Since there are vars, you'll get two copies of them that are not shared and things won't work.

    Either change the vars to dat (which works reasonably well if you know how to do it), or add methods to your middle class that
    proxy access to the serial port, or else use the Singleton object I posted earlier (search.parallax.com -> Singleton).
  • James LongJames Long Posts: 1,181
    edited 2007-02-28 00:49
    I'll try the method that you spoke of....I'm not sure exactly what the implementation of it is...but I'll check it out.

    Thanks for the reply.....I figured there would be a glitch somewhere....that is why it is great to have knowledgeable people around here.

    James L
Sign In or Register to comment.