![]() |
piSmasher Configuration Libraries
piSmasher peripheral device configuration libraries
|
Video Test Pattern Generator Userspace I/O Driver FreeBSD. More...
#include <sys/mman.h>#include <stdio.h>#include <stdlib.h>#include <stdint.h>#include <stdbool.h>#include <fcntl.h>#include "vid_tpg.h"Macros | |
| #define | VIDTPG_REG_CONTROL (0x00000000U) |
| #define | CONTROL_AP_START (1 << 0) |
| #define | CONTROL_AP_DONE (1 << 1) |
| #define | CONTROL_AP_IDLE (1 << 2) |
| #define | CONTROL_AP_READY (1 << 3) |
| #define | CONTROL_AUTO_RESTART (1 << 7) |
| #define | VIDTPG_REG_GINTEN (0x00000004U) |
| #define | VIDTPG_REG_IPINTEN (0x00000008U) |
| #define | VIDTPG_REG_ACTHEIGHT (0x00000010U) |
| #define | VIDTPG_REG_ACTWIDTH (0x00000018U) |
| #define | VIDTPG_REG_BGPAT_ID (0x00000020U) |
| #define | VIDTPG_REG_FGPAT_ID (0x00000028U) |
| #define | VIDTPG_REG_RGB_MASK_ID (0x00000030U) |
| #define | VIDTPG_REG_MOTION_SPEED (0x00000038U) |
| #define | VIDTPG_REG_COLOR_FMT (0x00000040U) |
| #define | VIDTPG_REG_ENABLE_INPUT (0x00000098U) |
| #define | VIDTPG_REG_PASS_THRU_X_START (0x000000a0U) |
| #define | VIDTPG_REG_PASS_THRU_Y_START (0x000000a8U) |
| #define | VIDTPG_REG_PASS_THRU_X_END (0x000000b0U) |
| #define | VIDTPG_REG_PASS_THRU_Y_END (0x000000b8U) |
| #define | REG_READ(__BASE__, __OFFSET__) *((volatile uint32_t *)(((uint8_t *)(__BASE__)) + (__OFFSET__))) |
| #define | REG_WRITE(__BASE__, __OFFSET__, __DATA__) *((volatile uint32_t *)(((uint8_t *)(__BASE__)) + (__OFFSET__))) = (__DATA__) |
Functions | |
| int | vidtpg_set_format (struct vidtpg *tpg, int height, int width, enum vidtpg_color_fmt color_fmt) |
| int | vidtpg_set_pattern (struct vidtpg *tpg, enum vidtpg_bgpat bgpat, enum vidtpg_fgpat fgpat) |
| int | vidtpg_init (struct vidtpg *tpg, const char *devname) |
Video Test Pattern Generator Userspace I/O Driver FreeBSD.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project.
| #define VIDTPG_REG_ACTHEIGHT (0x00000010U) |
Active height
| #define VIDTPG_REG_ACTWIDTH (0x00000018U) |
Active width
| #define VIDTPG_REG_BGPAT_ID (0x00000020U) |
Background pattern ID
| #define VIDTPG_REG_COLOR_FMT (0x00000040U) |
Color format
| #define VIDTPG_REG_CONTROL (0x00000000U) |
Control
| #define VIDTPG_REG_ENABLE_INPUT (0x00000098U) |
Enable input
| #define VIDTPG_REG_FGPAT_ID (0x00000028U) |
Foreground pattern ID
| #define VIDTPG_REG_GINTEN (0x00000004U) |
Global interrupt enable
| #define VIDTPG_REG_IPINTEN (0x00000008U) |
IP interrupt enable
| #define VIDTPG_REG_MOTION_SPEED (0x00000038U) |
Motion speed
| #define VIDTPG_REG_PASS_THRU_X_END (0x000000b0U) |
Video in horizontal end
| #define VIDTPG_REG_PASS_THRU_X_START (0x000000a0U) |
Video in horizontal start
| #define VIDTPG_REG_PASS_THRU_Y_END (0x000000b8U) |
Video in vertical end
| #define VIDTPG_REG_PASS_THRU_Y_START (0x000000a8U) |
Video in vertical start
| #define VIDTPG_REG_RGB_MASK_ID (0x00000030U) |
Color mask selection for RGB formats