I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge, with the following major changes and updates:
- Complete refactoring for 1-Wire stack and DS18B20 temperature sensor components
- Added HID Joystick device class to the FSL_USB_Stack
- New SDK_Timer component to work with Kinetis SDK
- New ST756P LCD driver component
- New TSL2561 digitial temperature sensor driver
- Added ReadByte() and WriteByte() GenericI2C functions
- Added 64bit mapping functions to Utility
- added configUSE_NEWLIB_REENTRANT and newlib reentrancy support to FreeRTOS
- Pull resistor support for SDK_BitIO
- Many smaller bug fixes and enhancements
HID Joystick Device Class
The HID Joystick Device Class component (see “DIY USB HID Joystick Device and Game Controller“) has settings implemented to configure the number of controls:
An example project is available on GitHub (https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/KDS/FRDM-KL25Z/FRDM-KL25Z_USB_HID_Joystick):
FreeRTOS with newlib Reentrancy Setting
The FreeRTOS component has now a setting to configure the FreeRTOS configUSE_NEWLIB_REENTRANT setting. If enabled, each task will have a reent structure assigned. Naturally, this setting is only useful if using the newlib or newlib-nano library.
💡 You must be familiar with newlib/newlib-nano reentrant usage and implementation. See as well this thread. and read the documentation inside of the newlib library. In general I do *not* recommend to use any standard library calls (like printf() or sprintf() in a multithreaded environment, as most implementations are *not* thread safe. Instead I’m using the string and printing functions of the McuOnEclipse libraries (e.g. Utility or Shell) which are thread safe.
More information about reentrancy with newlib/newlib-nano (courtesy of Dave Nadler):
1-Wire is a bus system designed by Dallas Semiconductor and can communicate with devices with one wire (plus GND) only. Basically it is a kind of I²C on one wire: one wire is used both for data and clock which makes it very interesting for low-cost connection to memory, sensors and more. The other cool feature is that with the two wires (GND + Data) it is possible to power small devices, so no other power lines are required.
For the 1-Wire protocol there is now a refactored component available. It supports all features of the protocol including searching for devices on the bus. On top of that, it features a command line interface plus extra debug pin support:
The component supports user timing settings for all phases of the protocol:
The DS18B20 is a 1-Wire digital temperature sensor. The component has been completely refactored and has added a command line interface:
The component supports single slave and multiple slave modes, with dynamic or fixed 64bit ROM codes:
Utility and map()
To facilitate porting legacy Arduino software, several Arduino functions have been added to the Utility component, including map functions. map64() is a 64bit variant.
The SDK_BitIO component features now pull resistor settings for SDK V1.x:
To read or write a single byte from the I²C bus with a reduced set of parameters, the ReadByte() and WriteByte() functions have been added to the GenericI2C driver:
The TSL2561 is a digital light sensor, found on the Hexiwear or available as breakout board e.g. from Adafruit (https://www.adafruit.com/product/439). The component implements a complete driver over I²C and includes command line support.
To configure a timer with the Kinetis/MCUXpresso SDK is not easy. A new component simplifies this:
The changes are documented on GitHub. The release is available on SourceForge: https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/. See “McuOnEclipse Releases on SourceForge” how to install the update. If you are not using Processor Expert: the components are available in normal source form on https://github.com/ErichStyger/McuOnEclipseLibrary.
I hope you find the new release useful.
Happy Updating 🙂
- Release on Sourceforge: https://sourceforge.net/projects/mcuoneclipse/files/PEx%20Components/
- Component installation instructions: McuOnEclipse Releases on SourceForge
- McuOnEclipse Library on GitHub: https://github.com/ErichStyger/McuOnEclipseLibrary
- USB HID Joystick project: https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/KDS/FRDM-KL25Z/FRDM-KL25Z_USB_HID_Joystick