Alpine Linux run/compile problem
-
- Posts: 50
- Joined: Sun Mar 11, 2018 6:03 pm
Re: Alpine Linux run/compile problem
Regarding i2c I have one question... where or how to set iic speed 100/400/hi-speed for RP?
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: Alpine Linux run/compile problem
I think the default I2C speed is set to 400000 in devicetree.dtb. So, it should be possible to change the I2C speed by modifying devicetree.dtb and restarting the operating system.
-
- Posts: 50
- Joined: Sun Mar 11, 2018 6:03 pm
Re: Alpine Linux run/compile problem
Thank you. 400kHz is OK.
-
- Posts: 50
- Joined: Sun Mar 11, 2018 6:03 pm
Re: Alpine Linux run/compile problem
While I managed to almost finish my project I got stuck with uart...
I am able to communicate, but in some case I need binary communication instead of ascii strings. I cannot set the input mode correctly according to uart example and
https://pubs.opengroup.org/onlinepubs/0 ... ios.h.html
If I send some string without crlf to RP, nothing is signalled to be read. As I add crlf I get all preivous data as well. I would like my RP receives everything sent instantly.
thx for help!
I am able to communicate, but in some case I need binary communication instead of ascii strings. I cannot set the input mode correctly according to uart example and
https://pubs.opengroup.org/onlinepubs/0 ... ios.h.html
Code: Select all
cfsetspeed(&settings, baud_rate);
settings.c_cflag &= ~PARENB; /* no parity */
settings.c_cflag &= ~CSTOPB; /* 1 stop bit */
settings.c_cflag &= ~CSIZE;
settings.c_cflag |= CS8 | CLOCAL; /* 8 bits */
//settings.c_lflag = ICANON; /* canonical mode */
settings.c_oflag &= ~OPOST; /* raw output */
settings.c_iflag &= ~ICRNL;
settings.c_iflag &= ~INLCR;
settings.c_iflag &= ~IGNCR;
/* Setting attributes */
tcflush(uart_fd, TCIFLUSH);
tcsetattr(uart_fd, TCSANOW, &settings);
thx for help!
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: Alpine Linux run/compile problem
Here is a link to the code that works for me:
https://github.com/pavel-demin/DiscoRed ... #L110-L122
https://github.com/pavel-demin/DiscoRed ... #L110-L122
-
- Posts: 50
- Joined: Sun Mar 11, 2018 6:03 pm
Re: Alpine Linux run/compile problem
Thank you. In the meantime I managed to solve myself also. Will take a look at your solution. THX!
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 93 guests