1. 12 2月, 2019 1 次提交
    • J
      Add IGpioController. (#212) · 8d92bda7
      Jeremy Kuhne 提交于
      * Add IGpioController.
      
      This allows compositing gpio extenders/multiplexers or any other providers with device drivers.
      
      * Hack to get command line build working
      
      * Address feedback, fix the rest of the projects
      
      * Add a few tests, tweak the projects to play nicer with VS
      
      * Rejigger the abstraction in Mcp23xxx
      
      Change the abstraction some and update the tests to map closer to the implementations. Fix a bug in setting single pin values.
      8d92bda7
  2. 11 2月, 2019 1 次提交
  3. 09 2月, 2019 1 次提交
    • J
      Change PinValue to struct (#211) · f56cbdaf
      Jeremy Kuhne 提交于
      * Change PinValue to struct
      
      Allows easier interop with raw data and enables us to extend with additional functionality. This will avoid having to add additional APIs for convenience and repeated typing of `PinValue == PinValue.High ? 1 :  0`.
      
      Doesn't impact existing enum usage.
      
      Sample usage:
      
      ``` C#
          class Program
          {
              static void Main(string[] args)
              {
                  PinValue value = true;
                  Console.WriteLine($"True is {value}");
                  TestApi(0);
                  Console.WriteLine($"Equality is {PinValue.High == true}");
              }
      
              public static void TestApi(PinValue value)
              {
                  Console.WriteLine($"PinValue is {value}");
              }
          }
      ```
      
      * Ok, so you can't switch a struct. :) Bonus now that you don't have to. There is no such thing as an invalid PinValue anymore.
      f56cbdaf
  4. 08 2月, 2019 7 次提交
  5. 07 2月, 2019 2 次提交
    • J
      Update reset api · f8bf9994
      Jeremy Kuhne 提交于
      Moved the 8 bit specific API entry point up to the base class. Did this to allow dropping 16 bit chips into code written for the 8 bit chips without having to recompile. Note that the GPIO style members on the API are agnostic and simply check to see if the pin numbers requested are in range.
      
      Factored the reset api the same way as the write/read api (ie port specificaion is only available on 16 bit chips).
      
      Finished updating the sample program. Removed one sample that we don't support directly (raw writes to register numbers). This is supported through the lower level bus drivers or via inheritance (proitected members) if really needed.
      f8bf9994
    • J
      Re-enable OpCodeTests and fix bug in SpiAdapter · 4208451a
      Jeremy Kuhne 提交于
      4208451a
  6. 06 2月, 2019 4 次提交
    • J
      64a9354d
    • J
      Make Mcp23xxx match up with IGpioController · 4b8c75da
      Jeremy Kuhne 提交于
      Add methods to interface to get/set multiple pins
      Add interface for bus controller to allow inheriting by functionality (e.g. bank selection is only available on 16 bit)
      
      Simple caching of the pin state added as a discussion starting point. Perf measurments (from Hd44780 extended sample):
      
      No optimizations - 25358 ms
      Send multiple bits - 22233 ms
      Cache GPIO state - 5283 ms
      
      To make it work we'd have to add more smarts if state changes where the cache isn't reliable and provide a way to turn caching on/off as it requires being the only user of the device.
      4b8c75da
    • G
      Added pca95x4 binding (#160) · e29fb1d9
      Greg Ingram 提交于
      * Added pca95x4 binding
      
      * Updated wording
      
      * Removed duplicate check on interrupt pin
      
      * Updated access modifier
      
      * Updated exception message
      
      * Added Pca95x4 to ReadMe
      
      * Removed unneeded items in proj file
      
      * Removed multi-byte read and write methods
      e29fb1d9
    • L
      Adding BrickPi3 device (#203) · 45f87e29
      Laurent Ellerbach 提交于
      * Adding BrickPi3 device
      
      * fixing names for Linux builds
      
      * fixing name of SPIExceptions.cs in csproj file
      
      * fiex typos in README, ,improved code based on GitHub reviews
      
      * remove specific exceptions to use generic ones, adjusted the code accordingly, added SPI bus Id and chip select line
      45f87e29
  7. 05 2月, 2019 5 次提交
  8. 04 2月, 2019 1 次提交
    • J
      Get HD44780 working · e0271400
      Jeremy Kuhne 提交于
      Tested with 16x2 and 20x4 displays with 4 and 8 bit addressing.
      Tested with MCP23008 I2C interface (on CrowPi).
      All device input working and tested, including custom characters.
      Performance tuned for 8 bit direct access (now 3X as fast).
      APIs massaged to align with existing .NET terminology (Console, etc.).
      Detailed comments added on behavior and performance considerations.
      
      Will follow up with assembly name changes. Also will add a simple LCD1602 and LCD2004 derived class for the most common cases.
      e0271400
  9. 03 2月, 2019 1 次提交
    • Z
      Added HC-SR501 binding (#190) · 58b2d6ee
      Zhang Yuexin 提交于
      * Added HC-SR501 binding
      
      * fixed first review
      
      * fixed second review
      
      * Update Hcsr501.Samples.csproj
      
      * Update Hcsr501.cs
      58b2d6ee
  10. 02 2月, 2019 1 次提交
  11. 01 2月, 2019 1 次提交
  12. 31 1月, 2019 4 次提交
  13. 30 1月, 2019 3 次提交
  14. 29 1月, 2019 3 次提交
  15. 28 1月, 2019 1 次提交
    • F
      HC-SR04 device binding (#153) · 9598969a
      Fredrik Eilertsen 提交于
      * Initial commit
      
      * Remove tests add GetDistance
      
      * Add sample
      
      * Update sample
      
      * Ref perform both operations at once
      
      * Fix some review
      
      * Update code to resemble krwq
      
      * Clean up the readmes
      
      * Add fritzing diagram
      
      * Add 1kohm resistor
      
      * Fix class docs
      9598969a
  16. 26 1月, 2019 1 次提交
  17. 24 1月, 2019 2 次提交
  18. 23 1月, 2019 1 次提交
    • G
      Cleanup for GPIO drivers (#148) · d594ce9f
      Greg Ingram 提交于
      * Added editconfig file
      
      * Beginning of cleaning
      
      * Added summaries and sorted
      
      * Added callback summaries
      
      * Fixed ordering and switch/case based on feedback
      d594ce9f