mirror of
https://github.com/brmlab/ledbar.git
synced 2025-06-09 13:24:01 +02:00
Set fp baudrate to 38400
This commit is contained in:
parent
4d99961eba
commit
9ad5213863
1 changed files with 8 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include <SDL.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define min(x,y) ( (x)<(y) ? (x) : (y) )
|
||||
|
@ -284,6 +285,13 @@ int main(int argc, char* argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (fp) {
|
||||
struct termios t;
|
||||
tcgetattr(fileno(fp), &t);
|
||||
cfsetspeed(&t, B38400);
|
||||
tcsetattr(fileno(fp), TCSADRAIN, &t);
|
||||
}
|
||||
|
||||
sleep(2);
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue