From d80736ab6e8e3cad2f1a30c6eaba2d6883dbe967 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 26 Aug 2017 20:31:40 +0200 Subject: Remove AmForth --- amforth-6.5/common/lib/hardware/i2c-eeprom.frt | 47 -------------------------- 1 file changed, 47 deletions(-) delete mode 100644 amforth-6.5/common/lib/hardware/i2c-eeprom.frt (limited to 'amforth-6.5/common/lib/hardware/i2c-eeprom.frt') diff --git a/amforth-6.5/common/lib/hardware/i2c-eeprom.frt b/amforth-6.5/common/lib/hardware/i2c-eeprom.frt deleted file mode 100644 index 7468933..0000000 --- a/amforth-6.5/common/lib/hardware/i2c-eeprom.frt +++ /dev/null @@ -1,47 +0,0 @@ -\ -\ Basic Access to I2C EEPROM -\ -\ useful words are -\ [ยข]@i2c.ee/[c]!i2c.ee -\ See cookbook for further information - -#require i2c.frt - -: i2c.ee.send-addr ( n -- ) - dup >< i2c.tx ( high byte ) i2c.tx ( low byte ) - \ no stop condition -; - -\ The write methods do not wait afterwards! -\ at least 5ms have to pass -: c!i2c.ee ( c addr hwid -- ) - i2c.begin - i2c.ee.send-addr - i2c.tx - i2c.end -; - -: !i2c.ee ( c addr hwid -- ) - i2c.begin - i2c.ee.send-addr - dup >< i2c.tx i2c.tx - i2c.end -; - -: c@i2c.ee ( addr hwid -- c ) - dup i2c.begin - swap i2c.ee.send-addr - i2c.start \ repeated start - i2c.rd i2c.tx \ hwid for reading - i2c.rx - i2c.end -; - -: @i2c.ee ( addr hwid -- n ) - dup i2c.begin - swap i2c.ee.send-addr - i2c.start \ repeated start - i2c.rd i2c.tx \ hwid for reading - i2c.rx >< i2c.rxn or - i2c.end -; -- cgit v1.2.3