精华内容
下载资源
问答
  • 为了更容易的上手,现将操作过程屏幕录像,文件上传成功。说明:使用屏幕录像专家V7.5,天空软件下载。 电路简单说明: _____ PA.x(I/O) ---| PA输出低电平LED亮。 下载网址:http://download.c

    为了更容易的上手,现将操作过程屏幕录像,文件上传成功。

    说明:使用屏幕录像专家V7.5,天空软件下载。

     

    电路简单说明:

                                                   _____    

                   PA.x(I/O) ---|<|------|____|-----|Vdd

     

    PA输出低电平LED亮。

     

    下载网址:

    http://download.csdn.net/source/1727673

    也可以在pudn.com下载

     

    展开全文
  • led GPIO driver

    2012-08-15 16:32:10
    linux led driver linux led driver linux led driverlinux led driverlinux led driver
  • Led driver

    2020-12-06 02:14:07
    <div><p>please review the add functionality in led_driver module</p><p>该提问来源于开源项目:paparazzi/paparazzi</p></div>
  • LED driver

    2013-01-01 22:43:00
    绝佳LED拓扑方案,关于一款新型LED图谱方案的学习,值得一看
  • led driver

    2008-05-01 09:28:37
    这是一个STOCK LED的显示控件,可以控制COMSIGHIT公司的LED显示,包括TEXT和image显示,可以控制颜色和滚动方向
  • LED Driver介绍

    2010-05-11 14:44:43
    Solomon LED Driver介绍
  • Zigbee led driver

    2021-01-12 07:47:22
    <p>Looking for a led driver (220v in, 12 v out, let's say 60 watt) wich is Zigbee controllable. On / off would be sufficient, no need for a dimmer. Application would be my garden lightning. <p>Any...
  • led_driver

    2009-12-05 21:54:25
    # cp /nfs_test/driver/led_driver/led_driver.ko /s3c2410_bin/ # cp /nfs_test/driver/led_test/led_test /s3c2410_bin/ 3.加载驱动 # cd /s3c2410_bin/ # insmod led_driver.ko # mknod /dev/led c 240 0 4....
  • BP2325 led driver

    2014-02-26 15:23:55
    BP2325 led driver smps controller
  • LED Driver POWER SUPPLIESpdf,LED Driver POWER SUPPLIES
  • 是platform_driver gpio-led驱动。 可以通过设备树和gpio-led来额外控制一个LED。如下图在P25和GND之间接入一个发光二极管。  在设备树bcm2710-rpi-3-b.dts中添加一个LED2来控制外部的LED &amp;leds { ...

    树莓派3b板上有两个LED, pwr (power) 和 act (activity)。是platform_driver gpio-led驱动。

    可以通过设备树和gpio-led来额外控制一个LED。如下图在P25和GND之间接入一个发光二极管。 

    在设备树bcm2710-rpi-3-b.dts中添加一个LED2来控制外部的LED

    &leds {
    	act_led: act {
    		label = "led0";
    		linux,default-trigger = "mmc0";
    		gpios = <&virtgpio 0 0>;
    	};
    
    	pwr_led: pwr {
    		label = "led1";
    		linux,default-trigger = "input";
    		gpios = <&expgpio 7 0>;
    	};
    
    	test_led: test {
    		label = "led2";
    		linux,default-trigger = "input";
    		gpios = <&gpio 26 0>;
    	};
    };

     

    重新编译dtb,

     

     

    1. make bcm2709_defconfig  
    2. make dtbs  

    将生成的bcm2710-rpi-3-b.dtb复制到SD卡boot下, 启动后,可以看到LED2出现

    pi@raspberrypi:~ $ cd /sys/class/leds/
    pi@raspberrypi:/sys/class/leds $ ls
    led0  led1  led2
    pi@raspberrypi:/sys/class/leds $ cd led2
    pi@raspberrypi:/sys/class/leds/led2 $ ls
    brightness  device  max_brightness  power  subsystem  trigger  uevent
    pi@raspberrypi:/sys/class/leds/led2 $ cat trigger 
    none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 default-on [input] panic mmc1 mmc0 rfkill-any rfkill0 rfkill1 
    
    

    通过设置brightness可以亮灭LED

    heartbeat 来触发LED blink

    pi@raspberrypi:/sys/class/leds/led2 $ cat brightness 
    0
    pi@raspberrypi:/sys/class/leds/led2 $ sudo sh -c "echo 1 > brightness"
    pi@raspberrypi:/sys/class/leds/led2 $ cat brightness 
    0
    pi@raspberrypi:/sys/class/leds/led2 $ sudo sh -c "echo heartbeat > trigger"
    pi@raspberrypi:/sys/class/leds/led2 $ sudo sh -c "echo none > trigger"
    pi@raspberrypi:/sys/class/leds/led2 $ 

    Reference

    Linux下用文件IO的方式操作GPIO(/sys/class/gpio)

    https://blog.csdn.net/lu_embedded/article/details/53061901

     

    展开全文
  • MR16 LED Dimmable Driver

    2013-08-04 00:12:13
    MR16 LED Dimmable Driver SPEC
  • MTK Android Driverled

    千次阅读 2014-03-15 15:52:39
    [FAQ07302][LED]如何配置LCD背光和LED,调试方法: LCD背光和LED配置文件 alps/custom/<proj name>lk/cust_leds.c alps/custom/<projname>/kernel/leds/mt65xx/cust_leds.c drvgen.exe编辑修改...

    [FAQ07302][LED]如何配置LCD背光和LED,调试方法:

    LCD背光和LED配置文件

    alps/custom/<proj name>lk/cust_leds.c

    alps/custom/<projname>/kernel/leds/mt65xx/cust_leds.c

    drvgen.exe编辑修改codegen.dws

    配置cust_leds.c参数:

    static struct cust_mt65xx_ledcust_led_list[MT65XX_LED_TYPE_TOTAL] = {

    {"red",                 MT65XX_LED_MODE_NONE,-1,{0}},

    {"green",              MT65XX_LED_MODE_NONE,-1,{0}},

    {"blue",                MT65XX_LED_MODE_NONE,-1,{0}},

    {"jogball-backlight",MT65XX_LED_MODE_NONE, -1,{0}},

    {"keyboard-backlight",MT65XX_LED_MODE_NONE,-1,{0}},

    {"button-backlight",  MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_BUTTON,{0}},

    {"lcd-backlight",       MT65XX_LED_MODE_CUST_BLS_PWM,(int)disp_bls_set_backlight,{0}},

    };

    LCD背光

    MT6589

    使用不同的控制源,配置模式:

    1.BL_PWM (BLS_PWM)

    {"lcd-backlight",    MT65XX_LED_MODE_CUST_BLS_PWM,(int)disp_bls_set_backlight,{0}},

    2.PWM1~PWM7

    如果是PWM1~4

    {"lcd-backlight",    MT65XX_LED_MODE_PWM, PWM1,{0,0,0,0,0}},

    {0,0,0,0,0}表示src_clk=32k时钟,div=0,HDuration=4;LDuration=4,pmic_pad=0

    频率计算:32K/(0+1)/64/4=125Hz

    如果使用PWM5~7

    {"lcd-backlight",    MT65XX_LED_MODE_PWM, PWM5,{1,1,32,32,1}},

    {1,1,30,30,1}表示src_clk=52M时钟,div=1,HDuration=32;LDuration=32,pmic_pad=1(PWM5~7在PMIC6320)

    频率计算:52M/(1+1)/64/32=12.695KHz

    3.GPIO脉冲

    {"lcd-backlight",    MT65XX_LED_MODE_GPIO, (int)Cust_SetBacklight,{0}},

    通过实现Cust_SetBacklight(level,div)函数操作GPIO动作

    4.类似OLED屏幕,通过写LCM 寄存器实现

    {"lcd-backlight",    MT65XX_LED_MODE_CUST, (int)Cust_SetBacklight,{0}},

    通过实现

    unsigned int Cust_SetBacklight(int level,int div)

    {

    mtkfb_set_backlight_level(level);

    }

    通过mtkfb_set_backlight_level(level);实现的函数指针将level传到LCM driver

    在LCM的driver中实现.set_backlight=lcm_setbacklight,

    5.PMIC6320的Isinks

    MT6320只有3个Isink,应该不能满足要求

    MT6572

    和Mt6589有区别的:

    1.PWM1~PWM5

    {"lcd-backlight",    MT65XX_LED_MODE_PWM, PWM1,{0,0,0,0,0}},

    {0,0,0,0,0}表示src_clk=32k时钟,div=0,HDuration=4;LDuration=4,pmic_pad=0

    频率计算:32K/(0+1)/64/4=125Hz

    {"lcd-backlight",    MT65XX_LED_MODE_PWM, PWM1,{1,1,32,32,0}},

    {1,1,30,30,0}表示src_clk=66M时钟,div=1,HDuration=32;LDuration=32,pmic_pad=0

    频率计算:66M/(1+1)/64/32=16.111KHz

    2.PMIC6323的Isinks

    MT6323有4个Isink,每路24mA电流,可以double为48mA,可以接8个LED

    {"lcd-backlight",    MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_LCD_ISINK,{0}},

    Button LED

    MT6589

    PMIC mt6530有KPD LDO

    {"button-backlight", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_BUTTON,{0}},

    MT6572

    mt6323没有KPD LDO,一般兼容使用Isink或者PWM

    ISink0和Isink1合并做Button LED

    {"button-backlight", MT65XX_LED_MODE_PMIC, MT65XX_LED_PMIC_NLED_ISINK01,{0}},

    注意:如果需要修改电流等级和double current,请修改leds.c

    brightness_set_pmic()和led_blink_pmic()

    电流等级接口:upmu_set_isinks_chx_step(0x0);//0x0 4mA;0x01 8mA;0x2 12mA;0x03 16mA0x04 20mA;0x05 24mA

    double current接口:upmu_set_isinks_chx_double_en(0x1);

    PWM1~5

    {"button-backlight",    MT65XX_LED_MODE_PWM, PWM1,{0,0,0,0,0}},

    LED

    MT6589

    1.Pre-charger(PCH_DET) LED

    主要使用由于关机充电LED,插USB charger点亮,lk阶段关闭

    如果需要打开PCH_DET:

    在mt_leds.c(lk)和leds.c 中要打开pre-charger LED 的控制

    Upmu_chr_chrind_on(1);//开启

    Upmu_chr_chrind_on(0);//关闭

    2.使用Isink接LED

    {"red",              MT65XX_LED_MODE_PMIC,MT65XX_LED_PMIC_NLED_ISINK0,{0}},

    {"green",            MT65XX_LED_MODE_PMIC,MT65XX_LED_PMIC_NLED_ISINK1,{0}},

    {"blue",             MT65XX_LED_MODE_PMIC,MT65XX_LED_PMIC_NLED_ISINK2,{0}},

    3.使用PWM控制LED

    {"red",               MT65XX_LED_MODE_PWM,PWM5,{0,0,0,0,1}},

    {"green",            MT65XX_LED_MODE_PWM,PWM6,{0,0,0,0,1}},

    {"blue",             MT65XX_LED_MODE_PWM,PWM7,{0,0,0,0,1}},

    注意:Mt6589上的PWM在sleep的时候没有波形输出的,如果sleep需要闪烁设计,请使用PMIC Mt6320上的

    PWM(PWM5~PWM7)

    MT6572

    与Mt6589的区别:

    1.mt6572没有pre-charger LED的PCH_DET pin

    2.Mt6572的PWM1~5在sleep的时候,都是没有波形输出的,设计请注意

    3.使用Isink设计时,如果1个isink接2路LED,请注意打开doublecurrent,或者step调大

    Flash light

    文件:alps/mediatek/custom/<projname>/kernel/flashlight/constant_flashlight/leds_stobe.c

    实现FL_enable()和FL_disable()

    MT6589有专门的flash LDO

    MT6572没有Flash LDO,可以通过控制PWM,GPIO,ISINK等控制Flashlight

    上层JNI lib文件

    alps/mediatek/hardware/liblights/lights.c

    如果需要同时打开2个以上的LED,请修改set_speaker_light_locked()里面的逻辑

    adb shell调试LCD背光和LED

    adb命令查看LED或者backlight的亮度status

    cd /sys/class/leds/xxx/brightness

    (xxx表示的是light的名字,例如green,blue,red分别表示绿灯、蓝灯和红灯,lcd-backlight表示的是lcd背光。)

    如果出现LED或Backlight不正常时,可以通过进入到相应的folder执行如下命令去检测是否driver有问题:

    echo brightness_level > brightness 检查是否按照你设置的亮度显示。

    对于LED来说brightness_level只要不是0,driver都会让led on。

    LCD背光不支持blink,测试LED blink可以执行如下命令:

    cd /sys/class/leds/xxx/

    echo timer > trigger       这个命令会创建delay_on和delay_off两个文件。

    echo on_time > delay_on 这个命令用于设置LEDon的时间

    echo off_time > delay_on 这个命令用于设置LEDoff的时间(On和off的时间都是以毫秒为单位的。)

    echo timer > trigger       命令清除delay_on和delay_off时间,让led off。

    echo none > trigger       删除delay_on/delay_off 节点

    在kernel_log 可以看到leds.s中函数调用的情况

      如printk("mt65xx_leds_set_cust: set brightness, name:%s, mode:%d,level:%d\n", cust->name, cust->mode, level);

     

    6.怎样添加一个自定义的LED灯

    1. 修改如下两个文件:

    alps/mediatek/custom/common/kernel/leds/inc/cust_leds.h

    enum mt65xx_led_type 

    {

    MT65XX_LED_TYPE_RED = 0,

    ... ...

    MT65XX_LED_TYPE_LCD,

    MT65XX_LED_TYPE_ABC, // Add a new LED type

    MT65XX_LED_TYPE_TOTAL,

    };

    alps/mediatek/custom/YOUR_PRJ/kernel/leds/mt65xx/cust_leds.c

    static struct cust_mt65xx_led cust_led_list[MT65XX_LED_TYPE_TOTAL] = { 

    {"red",               MT65XX_LED_MODE_NONE, -1,{0}},

    {"lcd-backlight",     MT65XX_LED_MODE_CUST, (int)Cust_SetBacklight,{0}},

    // Set LED params, Please refer to <Driver all in One>

    {"abc-backlight", MT65XX_LED_MODE_CUST, (int)Cust_SetBacklight_abc,{0}},

    };

     

    展开全文
  • LED Driver IC Document

    2015-12-08 16:28:04
    from a voltage source higher than the LED voltage. The device operates from an input supply between 6V and 60V and provides an externally adjustable output current of up to 550mA. Depending upon ...
  • <p>LED driver properties now can re-define an array for their individual mapping from key offsets to LED indices. <p>This array is both constexpr (can be used at compiletime) and stored in PROGMEM. ...
  • linux_LED_driver

    2010-11-10 08:34:22
    linux_LED_driver.简单的linux驱动程序,控制单个的led
  • led_driver.zip

    2019-11-28 22:31:45
    JZ2440教程中的LED驱动源码makefile文件,完整的驱动文件,学习简单的驱动移植,了解Linux的驱动架构
  • <div><p>Add support for NXP PCA9633 an I2C 4-bit LED driver. Supported blinkink period: 41ms to 10667ms Supported brightness value: 0 to 100% <p>This driver supports the following APIs: <ol><li>led_...
  • led_wall_driver_software 驱动LED墙的软件
  • <ol><li>LED driver API support.</li><li>Support for relevant LED driver LP3943.</li><li>Sample application for the corresponding driver.</li><li>Reduce bus frequency and enable I2C_3 for 96Boards ...
  • led_driver.c

    2019-07-07 11:47:25
    自己设计的led代码,可以移植到stm32 stm8 avr 51单片机等 自由度高,可以控制闪烁次数,关闭次数,开始时间,关闭时间等,非常巧妙,可以设置自定义个数的灯 非常牛逼
  • <div><p>Add driver support and sample for the TI LP5562 4 channel I2C-based LED driver. <p>This driver supports the entire currently available API and a sample is provided.</p><p>该提问来源于开源项目&...
  • // Assume our LED is configured to be a PWM LED LED_Params_init(&ledParams); ledHandle[CONFIG_LED_R_GPIO] = LED_open(CONFIG_LED_R_GPIO, &ledParams); ledHandle[CONFIG_LED_G_GPIO] = LED_open...
  • PWM LED Driver on ESP32

    2021-01-10 05:27:03
    <div><p>This PR is a initial support for PWM LED Driver on ESP32. <p>There are some work I want to do yet: <ul><li>Remove struct ledc_dev_t to improve the readability of the code;</li><li>Split some ...
  • LED B/L排列形式及驱动方法。适合研发LED背光人员学习。
  • platform driverLED与GPIO

    2019-09-14 15:51:16
    struct ath_led *led = container_of(led_cdev, struct ath_led, cdev); struct ath_softc *sc = led->sc; ath9k_ps_wakeup(sc); ath9k_hw_set_gpio(sc->sc_ah, led->gpio->gpio, (brightness != LED_OFF) ...

    http://lxr.free-electrons.com/source/include/linux/gpio_keys.h?v=3.2;a=arm

    https://www.kernel.org/doc/Documentation/leds/leds-class.txt

    这是无线网卡的LED功能的实现思路,最终还是会回到kernel里面的LED处理routine。

    /********************************/
    /*	 LED functions		*/
    /********************************/
    
    #ifdef CPTCFG_MAC80211_LEDS
    static void ath_led_brightness(struct led_classdev *led_cdev,
    			       enum led_brightness brightness)
    {
    	struct ath_led *led = container_of(led_cdev, struct ath_led, cdev);
    	struct ath_softc *sc = led->sc;
    
    	ath9k_ps_wakeup(sc);
    	ath9k_hw_set_gpio(sc->sc_ah, led->gpio->gpio,
    			  (brightness != LED_OFF) ^ led->gpio->active_low);
    	ath9k_ps_restore(sc);
    }
    
    static int ath_add_led(struct ath_softc *sc, struct ath_led *led)
    {
    	const struct gpio_led *gpio = led->gpio;
    	int ret;
    
    	led->cdev.name = gpio->name;
    	led->cdev.default_trigger = gpio->default_trigger;
    	led->cdev.brightness_set = ath_led_brightness;
    
    	ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &led->cdev);
    	if (ret < 0)
    		return ret;
    
    	led->sc = sc;
    	list_add(&led->list, &sc->leds);
    
    	/* Configure gpio for output */
    	ath9k_hw_cfg_output(sc->sc_ah, gpio->gpio,
    			    AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
    
    	/* LED off */
    	ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, gpio->active_low);
    
    	return 0;
    }
    
    int ath_create_gpio_led(struct ath_softc *sc, int gpio_num, const char *name,
    			const char *trigger, bool active_low)
    {
    	struct ath_led *led;
    	struct gpio_led *gpio;
    	char *_name;
    	int ret;
    
    	led = kzalloc(sizeof(*led) + sizeof(*gpio) + strlen(name) + 1,
    		      GFP_KERNEL);
    	if (!led)
    		return -ENOMEM;
    
    	led->gpio = gpio = (struct gpio_led *) (led + 1);
    	_name = (char *) (led->gpio + 1);
    
    	strcpy(_name, name);
    	gpio->name = _name;
    	gpio->gpio = gpio_num;
    	gpio->active_low = active_low;
    	gpio->default_trigger = trigger;
    
    	ret = ath_add_led(sc, led);
    	if (unlikely(ret < 0))
    		kfree(led);
    
    	return ret;
    }
    
    static int ath_create_platform_led(struct ath_softc *sc,
    				   const struct gpio_led *gpio)
    {
    	struct ath_led *led;
    	int ret;
    
    	led = kzalloc(sizeof(*led), GFP_KERNEL);
    	if (!led)
    		return -ENOMEM;
    
    	led->gpio = gpio;
    	ret = ath_add_led(sc, led);
    	if (ret < 0)
    		kfree(led);
    
    	return ret;
    }
    
    void ath_deinit_leds(struct ath_softc *sc)
    {
    	struct ath_led *led;
    
    	while (!list_empty(&sc->leds)) {
    		led = list_first_entry(&sc->leds, struct ath_led, list);
    		list_del(&led->list);
    		ath_led_brightness(&led->cdev, LED_OFF);
    		led_classdev_unregister(&led->cdev);
    		kfree(led);
    	}
    }
    
    void ath_init_leds(struct ath_softc *sc)
    {
    	struct ath9k_platform_data *pdata = sc->dev->platform_data;
    	char led_name[32];
    	const char *trigger;
    	int i;
    
    	INIT_LIST_HEAD(&sc->leds);
    
    	if (AR_SREV_9100(sc->sc_ah))
    		return;
    
    	snprintf(led_name, sizeof(led_name), "ath9k-%s",
    		 wiphy_name(sc->hw->wiphy));
    
    	if (led_blink)
    		trigger = sc->led_default_trigger;
    	else
    		trigger = ieee80211_get_radio_led_name(sc->hw);
    
    	ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, 1);
    
    	if (!pdata)
    		return;
    
    	for (i = 0; i < pdata->num_leds; i++)
    		ath_create_platform_led(sc, &pdata->leds[i]);
    }
    
    void ath_fill_led_pin(struct ath_softc *sc)
    {
    	struct ath_hw *ah = sc->sc_ah;
    
    	if (AR_SREV_9100(ah) || (ah->led_pin >= 0))
    		return;
    
    	if (AR_SREV_9287(ah))
    		ah->led_pin = ATH_LED_PIN_9287;
    	else if (AR_SREV_9485(sc->sc_ah))
    		ah->led_pin = ATH_LED_PIN_9485;
    	else if (AR_SREV_9300(sc->sc_ah))
    		ah->led_pin = ATH_LED_PIN_9300;
    	else if (AR_SREV_9462(sc->sc_ah) || AR_SREV_9565(sc->sc_ah))
    		ah->led_pin = ATH_LED_PIN_9462;
    	else
    		ah->led_pin = ATH_LED_PIN_DEF;
    
    	/* Configure gpio 1 for output */
    	ath9k_hw_cfg_output(ah, ah->led_pin, AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
    
    	/* LED off, active low */
    	ath9k_hw_set_gpio(ah, ah->led_pin, 1);
    }
    #endif

    转载于:https://my.oschina.net/rinehart/blog/161366

    展开全文
  • RT8474A LED Driver.pdf

    2021-03-11 14:07:46
    LED恒流驱动

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,586
精华内容 634
关键字:

driverled