I think I’m finally getting a handle on mynewt … I’m able to add tasks, schedule them, respond to them, etc. so this is some progress. :-)
I do have a question about the ADC though. I can find scant info on how to use the ADC. In looking through the header files, I see that hal_adc.h defines some useful looking things like /* This is the device for an ADC. The application using the ADC device * does not need to know the definition of this device and can operate * with a pointer to this device. you can get/build device pointers in the * BSP */ struct hal_adc; /* initialize the ADC on the corresponding BSP Pin. Returns a pointer * to the adc object to use for the methods below. Returns NULL on * error */ struct hal_adc *hal_adc_init(enum system_device_id sysid); /* read the ADC corresponding to sysid in your system. Returns * the adc value read or negative on error, See * hal_adc_get_resolution to check the range of the return value */ int hal_adc_read(struct hal_adc *padc); But the “you can get/build device pointers in the BSP is a tad vague. I know (or at least think I know) that the ADC pin is P0.03, so that would be pin 3, but since hal_adc has no size, or real definition. So, anyone used the ADC on the NRF52 Dev board? dg -- David G. Simmons (919) 534-5099 Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter <http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs> /** Message digitally signed for security and authenticity. * If you cannot read the PGP.sig attachment, please go to * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!! * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/> **/ ♺ This email uses 100% recycled electrons. Don't blow it by printing! There are only 2 hard things in computer science: Cache invalidation, naming things, and off-by-one errors.
signature.asc
Description: Message signed with OpenPGP using GPGMail
