Skip to content

Instantly share code, notes, and snippets.

@will127534
will127534 / imx585.c
Created May 20, 2024 04:03
IMX585 monochrome driver
// SPDX-License-Identifier: GPL-2.0
/*
* A V4L2 driver for Sony imx585 cameras.
*
* Based on Sony imx477 camera driver
* Copyright (C) 2019-2020 Raspberry Pi (Trading) Ltd
*/
#include <asm/unaligned.h>
#include <linux/clk.h>
#include <linux/delay.h>
@will127534
will127534 / mbw.c
Last active July 8, 2024 06:27
Modified from https://github.com/raas/mbw/blob/master/mbw.c with multithread support
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#include <string.h>
@will127534
will127534 / imx585.c
Created May 25, 2023 06:31
imx585 v4l2 driver
// SPDX-License-Identifier: GPL-2.0
/*
* A V4L2 driver for Sony imx585 cameras.
*
* Based on Sony imx477 camera driver
* Copyright (C) 2019-2020 Raspberry Pi (Trading) Ltd
*/
#include <asm/unaligned.h>
#include <linux/clk.h>
#include <linux/delay.h>
@will127534
will127534 / readSTA.c
Created April 29, 2023 23:43
Simple C code to reading and decode UNICAM_STA register
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#define BIT(n) (1 << (n))
#define UNICAM_BASE_ADDR 0xFE801000