To use this file copy and paste this:
// #URL-lib "http://pin1.org/forthlib/flb/I2C/BV4206.flb" into BV Terminal 3
or here to download.
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// BV4206 is the GPIO IC
// This is a library of words inteded for this IC it is an I2C
// device. The user should set the device address
// using the word 4205-init and supplying a device address.
// This will load as a stand alone file or can be used as a library
// providing the parent file includes the files in the REQUIRES
// section
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// HISTORY:
// Now uses common file bvsys.flb
// HISTORY:
// Now uses common file bvsys.flb
// REQUIRES:
// #URL-lib "http://pin1.org/forthlib/flb/General/soft1.flb" sid=0
// #URL-lib "http://pin1.org/forthlib/flb/General/pinsel.flb" sid=101
// #URL-Lib "http://pin1.org/forthlib/flb/I2C/i2c.flb" sid=103
// #URL-Lib "http://pin1.org/forthlib/flb/I2C/bvsys.flb"
// CONSTANTS:
// device variable is in bvsys.lib
Full Contents of File
: a1  device  s  1  sb  pin  sb  io  sb  p  ;   
: a2  device  s  2  sb  pin  sb  value  sb  p  ; 
: a3  device  s  3  sb  sb  device  1+  rs  rl  p  ; 
: a4  device  s  4  sb  sb  p  ; 
: a10  device  s  &10  sb  sb  p  ; 
: a11  device  s  &11  sb  sb  p  ; 
: a12  device  s  &12  sb  sb  p  ; 
: a13  device  s  &13  sb  device  1+  rs  rl  p  ; 
: a14  device  s  &14  sb  sb  p  ; 
: a15  device  s  &15  sb  sb  p  ; 
: a20  device  s  &20  sb  sb  p  ; 
: a21  device  s  &21  sb   
        width16  8  rshift  &ff  and  sb         
        width16  &ff  and  sb                           
        p
;       
: 4206-default  &42  bv-init  i2cfull  ;
: st&42  bv-init  i2cfull  .  ;