resource_manager.h File Reference

Embedded resource management. More...

#include "compiler_port.h"
#include "error.h"

Go to the source code of this file.

Data Structures

struct  DirEntry


struct {
   char_t   type
   uint32_t   dataStart
   uint32_t   dataLength
   uint8_t   nameLength
   char_t   name []
 Resource entry. More...
struct {
   char_t   type
   uint32_t   dataStart
   uint32_t   dataLength
   uint8_t   nameLength
 Root entry. More...
struct {
   uint32_t   totalSize
   ResRootEntry   rootEntry
 Resource header. More...


enum  ResType { RES_TYPE_DIR = 1 , RES_TYPE_FILE = 2 }
 Resource type. More...


error_t resGetData (const char_t *path, const uint8_t **data, size_t *length)
error_t resSearchFile (const char_t *path, DirEntry *dirEntry)

Detailed Description

Embedded resource management.


SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2022 Oryx Embedded SARL. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Oryx Embedded SARL (

Definition in file resource_manager.h.

Typedef Documentation


typedef { ... } ResEntry

Resource entry.


typedef { ... } ResHeader

Resource header.


typedef { ... } ResRootEntry

Root entry.

Enumeration Type Documentation

◆ ResType

enum ResType

Resource type.


Definition at line 46 of file resource_manager.h.

Function Documentation

◆ resGetData()

error_t resGetData ( const char_t path,
const uint8_t **  data,
size_t *  length 

Definition at line 39 of file resource_manager.c.

◆ resSearchFile()

error_t resSearchFile ( const char_t path,
DirEntry dirEntry 

Definition at line 135 of file resource_manager.c.

Variable Documentation

◆ dataLength

uint32_t dataLength

Definition at line 67 of file resource_manager.h.

◆ dataStart

uint32_t dataStart

Definition at line 66 of file resource_manager.h.

◆ name

char_t name[]

Definition at line 69 of file resource_manager.h.

◆ nameLength

uint8_t nameLength

Definition at line 68 of file resource_manager.h.

◆ rootEntry

ResRootEntry rootEntry

Definition at line 93 of file resource_manager.h.

◆ totalSize

uint32_t totalSize

Definition at line 92 of file resource_manager.h.

◆ type

char_t type

Definition at line 65 of file resource_manager.h.