C# Structure to Byte array conversion
An utility and some code examples how to automatically convert a struct to byte array and back. This comes very handy when implementing protocols. Add annotations to your structures, for example:
An utility and some code examples how to automatically convert a struct to byte array and back. This comes very handy when implementing protocols. Add annotations to your structures, for example:
An updated version of Yats is available in the Downloads section. The main highlights: Implemented undo/redo for test scenario and parameter editors Released Yats.Ports and Yats.Utilities libraries as a NuGet packages Added support for Bluetooth serial ports. Also, a special PortEmulator class for testing parsers without making actual connections Refresh of various GUI trees without… Read More »
An updated version of Yats is available in the Downloads section. The main changes: A major refactoring of logging code. Clean interfaces were defined and implemented, previous workarounds removed; Source solution upgrade – now compatible with the free Visual Studio 2013 Community edition! Created solution folders, finally started to use NuGet; Bug fixes What’s next?… Read More »
I have spent some time putting together a firmware to enable Power Down sleep mode in ATtiny441. The examples on the web did not do the trick out of the box. Here is my code with some leftover bits for enabling / disabling peripheral devices when they are used. The MCU goes to Power Down… Read More »
This should help you to get started writing a Yats test case. We will create a Visual Studio solution, set up project dependencies and debug a very simple test case. We are assuming that Yats is installed at C:\Program Files\Yats Create a new C# DLL project: Add the following DLL dependencies to the project: attributes.dll,… Read More »
This is a working solution how to start an Android Activity as the only one in the Back stack.
I’ll describe my solution on how to resize a view under a SlidingDrawer. When the drawer is collapsed, the view (a map in my app) scales to take the additional place. I ended up having two layers (two LinearLayouts in a FrameView), each containing its actual contents and a dummy padding view. During runtime, two… Read More »
Unlike some other I2C EEPROM IC drivers, AT24C08 / AT24C08A need their 2 MSB address bits sent in the first device address byte. This assumes the A2 pin is connected to ground: