var searchIndex = {}; searchIndex["trellis"] = {"doc":"The trellis lib provides functionality to control the Adafruit Trellis\nfrom Rust. It allows to control the LEDs and read button press events.\nFor details have a look at the Trellis struct in the core package.","items":[[0,"core","trellis","",null,null],[3,"LedButton","trellis::core","A particular button and LED combination in the grid.\nInconsistently used in the trellis implementation\nat the moment.",null,null],[12,"col","","",0,null],[12,"row","","",0,null],[3,"ButtonEvent","","Describes a button event that occurred. At the moment only button press\nis implemented.",null,null],[12,"buttons_pressed","","",1,null],[3,"Trellis","","The Trellis device abstraction.",null,null],[4,"Col","","A column in the trellis grid.\nSee the project readme for a scheme of the trellis orientation.",null,null],[13,"A","","",2,null],[13,"B","","",2,null],[13,"C","","",2,null],[13,"D","","",2,null],[4,"Row","","A row in the trellis grid.\nSee the project readme for a scheme of the trellis orientation.",null,null],[13,"R0","","",3,null],[13,"R1","","",3,null],[13,"R2","","",3,null],[13,"R3","","",3,null],[6,"EventLoopHandler","","The callback type for the button_evt_loop (see the Trellis struct for details).",null,null],[11,"clone","","",2,null],[11,"fmt","","",2,null],[11,"eq","","",2,null],[11,"clone","","",3,null],[11,"fmt","","",3,null],[11,"eq","","",3,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"fmt","","",1,null],[11,"empty","","Returns a empty event (nothing happend).",1,{"inputs":[],"output":{"name":"buttonevent"}}],[11,"new","","Construct a new Trellis device with a particular\nI2C-Device. See the devices module for a list\nof concrete devices that can be used.\nNote: object has to be initialised with a call to\ninit before you can control the LEDs and\nbuttons.",4,{"inputs":[{"name":"box"}],"output":{"name":"trellis"}}],[11,"init","","Initialise the trellis connection. Has to be called\nexactly once for a trellis.",4,null],[11,"set_led","","Turn a LED on the specified position to on.",4,null],[11,"clear_led","","Turn a LED on the specified position to off.",4,null],[11,"is_led_set","","Returns the LED state (on or off) from the internal display buffer.\nThe state may not reflect the actual state on the hardware if\nthe display buffer was not written.",4,null],[11,"write_display","","Writes the internal display buffer to the hardware.\nYou must call this function manually after updating\nthe LED states of the trellis.",4,null],[11,"button_evt_loop","","Start the button read event loop. This function does not terminate and can\nonly be stopped by the supplied event handler returning false.\nThe polling interval for reading the button is currently fixed to 30ms.",4,null],[0,"devices","trellis","",null,null],[3,"RaspberryPiBPlus","trellis::devices","A concrete device for using the Trellis\nwith a Raspberry Pi 2 B+.",null,null],[8,"I2CMasterDevice","","Host devices that are connected to the Trellis. The Trellis is the slave.\nThis trate is a small abstraction over the full I2C\nsince we need only a very small subset.\nThis trate exists also to make the I2C communciation testable (see also MockDevice\nthat implements this trait).",null,null],[10,"write_block","","",5,null],[10,"read_block","","",5,null],[11,"new","","",6,{"inputs":[],"output":{"name":"raspberrypibplus"}}],[11,"write_block","","",6,null],[11,"read_block","","",6,null],[0,"mock","trellis","",null,null],[3,"MockDevice","trellis::mock","A I2CMasterDevice implementation that exists solely for testing.\nThe MockDevice delegates writes and reades to the supplied\ncallback functions/data that are used in tests for checking the\ncorrect device communication.",null,null],[6,"WriteCb","","Callback for writes to device.\nThe first argument is a counter that starts\nwith 0 and is increment each time the callback\nfunction is called. The counter can be used\nto differentiate calls to the function\nin tests.",null,null],[11,"new_write_only","","",7,{"inputs":[{"name":"writecb"}],"output":{"name":"mockdevice"}}],[11,"new_read_only","","",7,{"inputs":[{"name":"vec"}],"output":{"name":"mockdevice"}}],[11,"new","","",7,{"inputs":[{"name":"writecb"},{"name":"vec"}],"output":{"name":"mockdevice"}}],[11,"write_block","","",7,null],[11,"read_block","","",7,null]],"paths":[[3,"LedButton"],[3,"ButtonEvent"],[4,"Col"],[4,"Row"],[3,"Trellis"],[8,"I2CMasterDevice"],[3,"RaspberryPiBPlus"],[3,"MockDevice"]]}; searchIndex["trellis_test"] = {"doc":"","items":[],"paths":[]}; initSearch(searchIndex);