Landfall

Annotated pkg/landfall-examples/qi_lb60_keypad/memory.h

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