Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#34 pic16 p18f452.h TRIS[A-E] update

closed-accepted
None
5
2005-01-04
2005-01-03
No

I thought it would be useful to allow authors to refer
to pins in whatever nominclature they normally do when
setting the TRIS[A-E] values.

Example:

Instead of forcing TRISCbits.TRISC6 = 0;
the author could say: TRISCbits.TX = 0;

This should reduce the number of potential errors by
incorrectly setting up the tri-state registers.

I have only applied this change to the 18f452.h file as
that is the only device I actually have to test
against. I would imagine that this type of change
should be applied uniformly.

Thanks,
Wes

Discussion

  • tristate_18f452.patch

     
    Attachments
  • Vangelis Rokas
    Vangelis Rokas
    2005-01-04

    Logged In: YES
    user_id=770505

    Interesting approach.
    I think this might help people initialize chips more easily.
    I won't directly commit your patch since only f452 is affected.
    I think its better to implement your approach to all device
    headers in the device/include/pic16 directory.

    This might take some time.

    Thank you for sharing your idea with us...

    regards,
    Vangelis

     
  • Vangelis Rokas
    Vangelis Rokas
    2005-01-04

    • assigned_to: nobody --> vrokas
    • status: open --> closed-accepted