Re: First steps and first problems.


Jorge Ramirez
 

On 06/18/2017 10:59 PM, Iñaki Malerba wrote:
Hi to all !

My name is Iñaki and this is my first email to this community. I hope you can help me!

Im trying to use zephyr on a 96b Carbon, but Im having some issues with drivers.

At first I tried to make PWM driver work, but I couldnt make it. At first I thought it was some issue with the pinmux or something, so i tried Bill Fletcher's approach and it worked great (letting me know it was not a hardware problem).

Now im trying to make I2C work to read a sensor, but, same as with the PWM, it's not working.

#define I2C_DEV "I2C_1"
struct device *i2c_dev;

i2c_dev = device_get_binding(I2C_DEV);
if (!i2c_dev) {
    printk("I2C: Device driver not found.\n");
    return;
}  

This code always prints the error message.

Note: I've enabled I2C over the menuconfig.

Any clue what can i be doing wrong?

to have i2c support in Carbon you'll need to merge this pull request in your project
https://github.com/zephyrproject-rtos/zephyr/pull/524


Join users@lists.zephyrproject.org to automatically receive all group messages.