Go Down

Topic: Arduino and 1-wire (Read 17 times) previous topic - next topic

yerg2k

I made a rough outline at http://www.arduino.cc/playground/Learning/OneWire

When I get some time later today, I'll go through and edit it up.

bigengineer

#36
Jan 18, 2007, 05:43 pm Last Edit: Jan 19, 2007, 03:26 pm by bigengineer Reason: 1
So, the easiest jobis done too, although I am not sure if I got it right. I thought I read something about the keywords.txt file, but I can't find it anymore.
Code: [Select]
#######################################
# Syntax Coloring Map For OneWire
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################

OneWire    KEYWORD1

#######################################
# Methods and Functions (KEYWORD2)
#######################################

reset      KEYWORD2
write_bit      KEYWORD2
read_bit      KEYWORD2
write      KEYWORD2
read      KEYWORD2
select      KEYWORD2
depower      KEYWORD2
reset_search      KEYWORD2
search      KEYWORD2
crc8      KEYWORD2
crc16      KEYWORD2

#######################################
# Instances (KEYWORD2)
#######################################


#######################################
# Constants (LITERAL1)
#######################################


[edit]changed the keywords.txt[/edit]

mellis

You can check out the keywords.txt of the existing libraries (in lib/targets/libraries).  It looks good, except that OneWire should be in the datatypes section and a KEYWORD1.  Now we just need to zip it all and upload it somewhere (the playground?).

bigengineer

Quote
You can check out the keywords.txt of the existing libraries (in lib/targets/libraries).  It looks good, except that OneWire should be in the datatypes section and a KEYWORD1.  Now we just need to zip it all and upload it somewhere (the playground?).


I made this after looking at an example. Only the OneWire wasn't clear to me. I have changed the file, so you can just copy/paste it.

mellis


Go Up