[PATCH] Add lvgl_hello: Sample Hello world app using littleVGL and libbsd
Vijay Kumar Banerjee
vijaykumar9597 at gmail.com
Tue Sep 3 05:22:14 UTC 2019
On Tue, Sep 3, 2019 at 5:15 AM Chris Johns <chrisj at rtems.org> wrote:
> On 3/9/19 4:56 am, Vijay Kumar Banerjee wrote:
> > > +void
> > > +libbsdhelper_start_shell(rtems_task_priority prio)
> > > +{
> > > + rtems_status_code sc = rtems_shell_init(
> > > + "SHLL",
> > > + STACK_SIZE_SHELL,
> > > + prio,
> > > + CONSOLE_DEVICE_NAME,
> > > + false,
> > > + true,
> > > + NULL
> > > + );
> > > + assert(sc == RTEMS_SUCCESSFUL);
> > > +}
> > > +
> > > +static void
> > > +Init(rtems_task_argument arg)
> > > +{
> > > + rtems_status_code sc;
> > > + int exit_code;
> > > + (void)arg;
> > > + static lv_color_t buf[LV_HOR_RES_MAX*10];
> > > + static lv_disp_buf_t disp_buf;
> > > +
> > > + puts("\nRTEMS I2C TEST\n");
> > > + exit_code = bbb_register_i2c_0();
> > > + assert(exit_code == 0);
> >
> > Is this needed for the display to work?
> >
> > Yes. We need to register the rtems i2c device in order to work with
> the TDA
> > driver
> > as libbsd uses rtems i2c driver. The bbb_register_* is making it bbb
> > specific, what
> > do you suggest to make it more generic?
> >
> > A good reference I could find is in:
> > https://git.rtems.org/rtems/tree/testsuites/libtests/i2c01/init.c#n534
> >
> > Should I do something like this in the lvgl example?
>
> I am sorry, I do not understand what you are asking with the link to that
> test.
>
> Sorry for not being clear in the question.
In the i2c01 test that the link points to, i2c_bus_register API has been
used
and the transfer, set_clock and destroy functions are defined as static in
the
program itself.
I was asking if I can add the transfer, set_clock functions in my example
and
make an i2c_bus_register call.
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190903/e1ffe7a3/attachment-0002.html>
More information about the devel
mailing list