Jump to content
I2Cdevlib Forums

Register metadata released as Open Source?

Recommended Posts

http://www.i2cdevlib.com/ front page mentions:


core database of detailed register maps for each supported device

for automatic multi-platform code generation


Are ther plans or intentions to release this metadata as open-source, to allow community to develop even more innovative usages for it? (As a rough example, it would allow to provide bindings for more languages, starting with raw C.)


Link to comment
Share on other sites

Hi pfalcon,

This is supported in XML format for now, but it is not currently documented as I didn't consider it to be "finished" (though I guess that's no excuse). I should add a link to the XML format at least. You can try this one for example:


You can get any other device's register map by substituting the short name with the new one, e.g. "ak8975" or "adxl345". Note that the devices which actually have register maps defined are somewhat limited; the device entry form is another unfinished tool on the site, unfortunately.

Link to comment
Share on other sites

Very nice, thanks Jeff!


Let me first elaborate why I'm asking. I started a project some time ago which in spirit is similar to i2cdevlib, though I decided to shoot for generality instead of consistency. Well, basic idea was to separate register metadata from another project (I hope to post about that too), to make that data more reusable. The format of metadata is not stipulated, in the basic form it would be just as C header with defines. Of course, I'd aim a bit higher, for some more structured metadata format, and well, did my homework to find some existing open-source solution and base on that instead of rolling out my own format.


Well, I did find something to base on, and went with that (already extended format a bit, etc.). Format is based on YAML, which I'm pretty happy about, as it's more human readable/writable. You can see sample here: https://github.com/pfalcon/libperipha/blob/master/arm/cortex-m/lm4/gpio.yaml . The usecase both the original author worked on and I was interested in first of all is wrapping Cortex-M MCU register definitions. Note that I don't shoot for complete coverage - the idea is to describe what's currently needed, and then add more stuff on demand (for example, as contribution from other folks).


So, I hope that explains my interest to the availability and format of your metadata. I don't want to start with proposing to work on converge formats or something (especially that I have more priority proposals ;-) ), but IMHO we should at least be aware of each other's efforts, and preferably make sure that formats are general enough to convert between them. libperipha's format should be general enough already and open to extension, and as far as I can tell your format doesn't have I2C-specific parts either.


All in all, I'd appreciate your comments / some background info why you chose specifically this scheme (like, is it based on some existing format), what do you think of YAML as metadata syntax, etc. Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Hi pfalcon,


I ended up with the XML format I have as a logical representation of the MySQL db backend I built specifically for the register maps. I built it to fit what I needed which is basically a device which has some properties an a list of registers, and each register has bitfields, and each bitfield has some options (some of them do anyway). The XML compliance changes (CDATA etc.) were recommended by the guy who originally asked for XML output. He created his own XSLT file to go along with it, and needed something that was 100% XML compliant.


I'm open to YAML or other formats, or other data structures which make sense; I only built this to fit with what I needed at the time. Any potentially major changes would be better made earlier than later, before lots of people start using it.

Link to comment
Share on other sites

  • 9 years later...

Hi all! Have you ever heard of websites where homework is done for you? And what about the sites that develop mobile applications for you? What about programming? Not? And I'll tell you where these works are being prepared! Then it will be really interesting for you to look here. They do any job in the shortest possible time and at very reasonable prices! Fly in sooner -  https://www.domychemistry.com/do-my-organic-chemistry-homework

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...