wlmaker
Loading...
Searching...
No Matches
Functions | Variables
wlmclock.c File Reference
#include <libbase/libbase.h>
#include <libwlclient/libwlclient.h>
#include <primitives/primitives.h>
#include <primitives/segment_display.h>
#include <math.h>
#include <sys/time.h>
Include dependency graph for wlmclock.c:

Functions

uint64_t next_draw_time (void)
 
bool icon_callback (wlclient_icon_t *icon_ptr, bs_gfxbuf_t *gfxbuf_ptr, void *ud_ptr)
 
void timer_callback (wlclient_t *client_ptr, void *ud_ptr)
 
int main (int argc, char **argv)
 

Variables

static const uint32_t color_led = 0xff55ffff
 
static const uint32_t color_off = 0xff114444
 
static const uint32_t color_background = 0xff111111
 

Detailed Description

Example app for libwlclient.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Demonstrator for using the icon protocol.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ icon_callback()

bool icon_callback ( wlclient_icon_t * icon_ptr,
bs_gfxbuf_t * gfxbuf_ptr,
void * ud_ptr )

Draws contents into the icon buffer.

Parameters
icon_ptr
gfxbuf_ptr
ud_ptr

◆ main()

int main ( int argc,
char ** argv )

Main program.

◆ next_draw_time()

uint64_t next_draw_time ( void )

Returns the next full second for when to draw the clock.

◆ timer_callback()

void timer_callback ( wlclient_t * client_ptr,
void * ud_ptr )

Called once per second.

Variable Documentation

◆ color_background

const uint32_t color_background = 0xff111111
static

Background color in the VFD-style display.

◆ color_led

const uint32_t color_led = 0xff55ffff
static

Foreground color of a LED in the VFD-style display.

◆ color_off

const uint32_t color_off = 0xff114444
static

Color of a turned-off element in the VFD-style display.