Examples | rtems-examples: Add Scrutiny initialization code (!34)

Gedare Bloom (@gedare) gitlab at rtems.org
Tue Sep 1 19:54:38 UTC 2026




Gedare Bloom started a new discussion on scrutiny/init/test.c: https://gitlab.rtems.org/rtems/rtos/rtems-examples/-/merge_requests/34#note_158457

 > +    uint32_t timestamp = ( ts.tv_sec * 1000000 ) + ( ts.tv_nsec / 1000 );
 > +    uint32_t time_delta = timestamp - last_timestamp;
 > +    ssize_t bytes = read( USART2, in_buffer, sizeof(in_buffer) );
 > +
 > +    if ( bytes > 0 ) {
 > +        scrutiny_c_main_handler_receive_data( scrutiny_handler, in_buffer, (uint16_t)bytes );
 > +    }
 > +
 > +    scrutiny_c_main_handler_process( scrutiny_handler, time_delta * 10U );
 > +    scrutiny_c_loop_handler_variable_freq_process( task_idle_lh, time_delta * 10U );
 > +
 > +    uint16_t to_send = scrutiny_c_main_handler_data_to_send( scrutiny_handler );
 > +
 > +    if ( to_send > 0 ) {
 > +        uint16_t sent = scrutiny_c_main_handler_pop_data( scrutiny_handler, out_buffer, sizeof(out_buffer) );
 > +        write( USART2, out_buffer, sent );

can you modularize this to make it easier for someone to change it to use a different transport here?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems-examples/-/merge_requests/34#note_158457
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-1263g8vetkt8hgfscynytk622-9/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260901/58ba1e13/attachment-0001.htm>


More information about the bugs mailing list