Hello,
So I am developing software currently for the MangOH red system, but I have plans to jump to MangOH yellow once its available. Will any code I develop for the MangOH red be usable on the yellow?
Hello,
So I am developing software currently for the MangOH red system, but I have plans to jump to MangOH yellow once its available. Will any code I develop for the MangOH red be usable on the yellow?
Hello,
Not knowing what your code looks like, it’s hard to tell. Be aware there are a lot of hardware differences between mangOH Red and mangOH Yellow.
For example this can be a problem if you’re using the board GPIOs because the mapping is different.
Also, what module is mounted on your mangOH Red ? is it the WP7702 ?
I see, I will be using the same module, but will the GPIOs still be different?
Some of them will be different. For example on mangOH Yellow the accelerometer interruption pin is linked to GPIO 38, and on mangOH Red the same pin is linked to GPIO 36.
You can check differences on the schematics of the boards:
Using Legato, you can bind GPIO services based on your board. To do that, you can define a build variable in your sdef:
buildVars:
{
BOARD = mangoh_yellow
// BOARD = mangoh_red
}
Then in your adef you can do this:
bindings:
{
#if ${BOARD} = mangoh_yellow
app.appComponent.le_gpioPinAccel -> gpioService.le_gpioPin38
#elif ${BOARD} = mangoh_red
app.appComponent.le_gpioPinAccel -> gpioService.le_gpioPin36
#endif
}
And you’ll be able to write a generic source code for both your mangOH Red and mangOH Yellow.
I don’t know if it’s the correct way to do this, but it worked fine for me