How to access device specific functionality in MBED? - mbed

Is there a generic way to access device specific functionality from within the MBED development stack or am I S.O.O.L and need to go to a lower level tool chain? (want to use the integrated op-amps of the STM32F303RE device)

You can just use the STM32 HAL functions like you'd normally do. Mbed OS wraps around these. Note that these functions are not guaranteed to be thread safe (unlike the Mbed HAL).

Related

Talk to an USB HID device from within GNU Octave

I need to control a measurement instrument from within GNU Octave. The instrument has an USB HID interface. I just need to read or change the settings of the instrument. It's not about getting measurement data from the instrument.
What options are there to do this from within GNU Octave, and how do they work?
The simplest approach would be to use an already made Octave package (like the instrument-control package). Then you could check the documentation and read /write to and from a USB device.
The package linked above (and here again) has a USB TMC set of functions if the USB device works with this library. See the function list to find out how to use the package. As far as I am aware this package only works on Linux for USBTMC (according to the wiki).
Otherwise if you are not running Linux, or the device is not supported, I cannot specifically see any other already-written set of Octave functions for communication.
However, if you have the time it could be worth writing just a singular MEX (C/C++) function to open the communication channel and read settings from the device.
You could then make this work on Windows as well. Most of this functionality is already implemented in libraries such as signal11 (just to name one...), which that library itself is already cross-platform. Using that library inparticular makes it look like a very short MEX file to write.
I hope this helps and check out the links for further information about the topics discussed :)

Does TideSDK give you access to hardware (e.g. USB)?

I need to do some basic talking to hardware over USB and am looking for a simple way to build a cross-platform desktop app.
What do you mean by "Talking"? you can use the "Ti.Filesystem" from the tide API, it enables you to read and write files.

STM32 Embedded GUI Library porting for F4 Discovery

I'm trying to use the STM32 Embedded GUI Library with STM32F4 Discovery Board.
Has anyone already done a porting of this library on the discovery?
Otherwise, how can I try to port it and what is the "weight" in terms of work of such a porting? (I'm new in programming embedded devices)
I used Littlev Grapics Library (free, open source) on STM32 discovery. Maybe you will like it too.
http://www.gl.littlev.hu/blog/8/embedded-gui-on-stm32-discovery-board-with-littlev-graphics-library
It comes with a working project to download to STM32 Disocvery.
Maybe you want to take a look at µGFX: https://ugfx.io
It comes with a ton of optional features and built-in drivers. Your hardware setup is already supported.
You might also consider STemWin, it is already supported on STM32F4. In either case the biggest porting effort will probably be in supporting your specific display hardware.
This link will help to implement STemWin on STM32F4.. Link to blog..
It can be easily ported if the drivers for LCD and Touch are properly configured.

Bonjour communication wrapper for Objective-C?

I've been using MYNetwork by the venerable Jens Alfke for an app of mine that allows devices to connect and share info over the network, it's actually a mission-critical part of the app. I tried writing my own wrapper for all of the C-level stuff you have to do for Bonjour, but it didn't work out so well, so I moved to MYNetwork.
It's been great so far, but the fact it's essentially opaque to me is causing trouble, as is that I want to move over to ARC once we can submit apps with it (there's a lot of Objective-C object references in structs, which ARC hates).
Can anyone recommend a similar wrapper, ideally that allows easy message passing between a client and a server over Bonjour as well as service discovery?
Just a thought- Would using ZeroMQ advertised and discovered by the stock NSNetService suffice? Separating the service pub/sub from the actual communication would allow you to use other bonjour libraries like Avahi on linux too. ZeroMQ is sufficiently simple to make wrapping trivial, yet powerful enough to cope with complex network topologies, fast.
I have experience with both technologies in isolation but not together although I see no reason why it wouldn't work. The only caveat right now is the limited body of collective experience of ZeroMQ use on iOS but I'd expect that to change over time.
You know you can disable ARC for specific files? So, you can just disable ARC for the library, and keep it on for your other files.
Disable Automatic Reference Counting for Some Files

Implementation of APIs on different platforms

OK, this is basically just about any non-default OS API running on all different OS. But for my example let´s consider platform Windows, API SDL (Simple DirectMedia Layer).
Actually this question came to my mind when I was reading about SDL. Originally, I thought that on Windows (and basically any other OS) you must use OS API to make certain actions, like writing to screen, creating window and so on, because that API knows what kernel calls and system subroutines calls it has to do. But when I read about SDL, I surprised me, because, you cannot make computer to do anything more than OS can, since you cannot access HW directly, only thru OS API, from Console allocation to DirectX.
So, my question actually is, how does this not-default-OS APIs work? Do they use (wrap) original system API (like MFC wraps win32 api)? Or, do they actually have direct access to Windows kernel? Or is there any third, way in between?
Indeed, SDL is a wrapper for OS-specific calls, although with many simplifications and convenience functions. On Windows, SDL uses DirectX.