Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb575efa

Browse files
committed
Add MuxTo sources and binaries
1 parente8a2736 commitb575efa

File tree

19 files changed

+2446
-0
lines changed

19 files changed

+2446
-0
lines changed

‎firmwares/MuxTO/JICE_io.cpp‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
stk_io.cpp
3+
4+
Created: 18-11-2017 15:20:29
5+
Author: JMR_2
6+
*/
7+
8+
// Includes
9+
#include<Arduino.h>
10+
#include"JICE_io.h"
11+
#include"sys.h"
12+
13+
namespace {
14+
// *** Baud rate lookup table for UBRR0 register ***
15+
// Indexed by valid values for PARAM_BAUD_RATE_VAL (defined in JTAG2.h)
16+
uint16_t baud_tbl[8] = {baud(2400),baud(4800),baud(9600),baud(19200),baud(38400),baud(57600),baud(115200),baud(14400)};
17+
}
18+
19+
// Functions
20+
uint8_tJICE_io::put(char c) {
21+
SERIALCOM.write(c);
22+
return c;
23+
}
24+
25+
uint8_tJICE_io::get(void) {
26+
//while (!SERIALCOM.available());
27+
uint8_t c = SERIALCOM.read();
28+
return c;
29+
}
30+
31+
voidJICE_io::init(void) {
32+
SERIALCOM.begin(115200);
33+
}
34+
35+
voidJICE_io::flush(void) {
36+
SERIALCOM.flush();
37+
}
38+
39+
voidJICE_io::set_baud(JTAG2::baud_rate rate) {
40+
41+
}

‎firmwares/MuxTO/JICE_io.h‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
stk_io.h
3+
4+
Created: 18-11-2017 14:55:53
5+
Author: JMR_2
6+
*/
7+
8+
9+
#ifndef JICE_IO_H_
10+
#defineJICE_IO_H_
11+
12+
#include<stdint.h>
13+
#include"JTAG2.h"
14+
15+
#warning "modify this to match your USB serial port name"
16+
#defineSERIALCOM SerialUSB
17+
18+
namespaceJICE_io {
19+
// Function prototypes
20+
uint8_tput(char c);
21+
uint8_tget(void);
22+
voidinit(void);
23+
voidflush(void);
24+
voidset_baud(JTAG2::baud_rate rate);
25+
}
26+
27+
#endif/* JICE_IO_H_*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp