Git Product home page Git Product logo

ms5611-driver's Introduction

MS5611-01BA03 Barometric Pressure Sensor Driver

MS5611-01BA03 Barometric Pressure Sensor, with statinless steel cap.

Building the source

  1. Clone driver code
git clone https://github.com/Sarlor/ms5611-driver.git
cd ms5611-driver/src
  1. Edit Makefile file, set the correct kernel directory 'KERN_DIR'
vim Makefile
  1. Copy the driver files to the 'hwmon' directory
make cp
  1. Add board-level support code to the appropriate place
vim arch/arm/plat-s5p4418/realarm/device.c
#if defined(CONFIG_SENSORS_MS561101BA) || defined(CONFIG_SENSORS_MS561101BA_MODULE)
#include <linux/i2c.h>

/* CODEC */
static struct i2c_board_info __initdata ms561101ba_i2c_bdi = {
	.type   = "ms561101ba",
	.addr   = 0x77
};
#endif

#if defined(CONFIG_SENSORS_MS561101BA) || defined(CONFIG_SENSORS_MS561101BA_MODULE)
	printk("plat: add pressure MS5611-01BA03\n");
	i2c_register_board_info(1, &ms561101ba_i2c_bdi, 1);
#endif
  1. Modify the kernel configuration file for ms5611, and add the code to the appropriate place
vim drivers/hwmon/Kconfig
config SENSORS_MS561101BA
	tristate "MS5611-01BA03 Barometric Pressure Sensor"
        depends on I2C
        default n
        help
		Say Y here to enable the pressure sensor.

                If unsure, say N.
  1. Edit Makefile for add ms5611 driver module
vim drivers/hwmon/Makefile
obj-$(CONFIG_SENSORS_MS561101BA)        += ms561101ba.o
  1. Configure the kernel for required submodule, then save config
make menuconfig
Device Drivers -> Hardware Monitoring support -> MS5611-01BA03 Barometric Pressure Sensor

ms5611-driver's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.