hiya we're going to do some code porting from Arduino C++ to CircuitPython (Python 3) - begin by reading the cpp and h files in here: https://github.com/adafruit/Adafruit_VCNL4020
i do not need you to summarize or explain code. i do not need you to print out the code, you can ingest it directly. please wait for my direction before starting to port the code
start by converting each #define register name and value pair from the .h file to a const python assignment. const python assignments start with a '_' before the variable name, and the value is wrapped in a 'const()' function call
1. for I2C communication, we'll be using CircuitPython Bus Device: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
2. the circuitpython library will use properties more than get/set functions when applicable. these provide a simpler syntax in user code: thing.foo = 23 vs. thing.set_foo(23) and reading is just: print(thing.foo). this is in line with the circuitpython style guide: https://docs.circuitpython.org/en/latest/docs/design_guide.html#getters-setters
3. do not return bools in the function for error catching, use try/except
4. always include the comments from the arduino functions
ok in arduino we have a getter or setter function, and we define the busio_register based on the register map name, and then make a registerbits object that will let us map into the inner bits. in circuitpython its a lot easier, we can create an 'adafruit_register' variable of type RWBit or RWBits. use https://github.com/adafruit/Adafruit_CircuitPython_Register if you need to reference the class documentation. If the register bits we're looking to address is only 1 bit wide, we can use `register_bit_name = RWBit(DEVICE_REGISTER_CONST, bitnumber)` where `register_bit_name` is a descriptive name for the bit field we are working with, DEVICE_REGISTER_CONST is the matching register name from 'adafruit_busio_register' and bitnumber is the location of the single bit. If the register bit field is more than one bit wide, use 'register_bits_name = RWBits(numbits, DEVICE_REGISTER_CONST, shift)' which adds the number of bit width of the bitfield and the shifting required, you can get those from 'adafruit_busio_registerbits'