Landfall

pkg/landfall-examples/qi_lb60_keypad/memory.h

289:3c7cc99ed90f
6 months ago Paul Boddie Widened various address and size values to avoid overflow/truncation issues. Fixed high-capacity card support by changing the initialisation procedure. cpm-library-improvements
     1 /*     2  * Memory allocation utility functions.     3  *     4  * Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk>     5  *     6  * This program is free software; you can redistribute it and/or     7  * modify it under the terms of the GNU General Public License as     8  * published by the Free Software Foundation; either version 2 of     9  * the License, or (at your option) any later version.    10  *    11  * This program is distributed in the hope that it will be useful,    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    14  * GNU General Public License for more details.    15  *    16  * You should have received a copy of the GNU General Public License    17  * along with this program; if not, write to the Free Software    18  * Foundation, Inc., 51 Franklin Street, Fifth Floor,    19  * Boston, MA  02110-1301, USA    20  */    21     22 #ifndef __DRIVERS_LCD_ARCH_JZ4740_MEMORY_H__    23 #define __DRIVERS_LCD_ARCH_JZ4740_MEMORY_H__    24     25 #include <l4/io/io.h>    26 #include <l4/sys/types.h>    27     28 int get_device(char const *hid, l4io_device_handle_t *dh,    29                l4io_resource_handle_t *rh);    30     31 int get_resource(l4io_device_handle_t dh, l4io_resource_t *res,    32                  enum l4io_resource_types_t type);    33     34 int get_memory(char const *hid, l4_addr_t *start, l4_addr_t *end);    35     36 #endif /* __DRIVERS_LCD_ARCH_JZ4740_MEMORY_H__ */