跳转至

lib/application/app.h

Application descriptor and clock/boot provider interfaces. More...

Classes

Name
struct __CFBDApplication
Application descriptor.

Detailed Description

Application descriptor and clock/boot provider interfaces.

Author: Charliechen114514 (chengh1922@mails.jlu.edu.cn)

Version: 0.1

Date: 2026-01-10

This header defines the CFBDApplication structure which aggregates application-specific bootstrap and clock provider hooks used by the framework. It also declares helper functions to obtain the global application's boot table and clock/tick providers.

Implementations in the application layer should provide matching definitions for the providers declared here. Keep these interfaces small to allow linking a minimal runtime for constrained targets.

Source code

#pragma once

#include <stdint.h>

#include "cfbd_define.h"
#include "sys_boot/boot.h"

typedef uint32_t (*CFBD_ClockFreqProvider)(void);

typedef uint32_t (*CFBD_ClockTickProvider)(void);

typedef struct __CFBDApplication
{
    CFBD_BootStrapFunc selfBootFunc;

    CFBD_BootArgs bootargs;

    CFBD_ClockFreqProvider freq_provider;

    CFBD_ClockTickProvider tick_provider;
} CFBDApplication;

extern CFBDBootTuple* CFBD_AppBootMaker(void);

extern CFBD_ClockFreqProvider CFBD_AppClockProvider(void);

extern CFBD_ClockTickProvider CFBD_AppTickProvider(void);

CFBDApplication* getApp(CFBD_Bool request_auto_boot);

Updated on 2026-02-03 at 13:21:55 +0000