forked from Imagelibrary/rtems
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
616545350f | ||
|
|
13cbd83444 | ||
|
|
ef6e6e3087 | ||
|
|
7b40317e76 | ||
|
|
b7f1fa2f89 | ||
|
|
45f60cfbcf | ||
|
|
2243fd6d6b |
4
.gitlab/gitlab-ci.yml
Normal file
4
.gitlab/gitlab-ci.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
include:
|
||||
- project: 'administration/integration'
|
||||
file:
|
||||
- 'ci/config/rtems.yml'
|
||||
@@ -590,7 +590,7 @@ int ns16550_set_attributes(
|
||||
* turn into the LSB and MSB divisor latch registers.
|
||||
*/
|
||||
|
||||
(*setReg)(pNS16550, NS16550_LINE_CONTROL, SP_LINE_DLAB);
|
||||
(*setReg)(pNS16550, NS16550_LINE_CONTROL, SP_LINE_DLAB | ucLineControl);
|
||||
(*setReg)(pNS16550, NS16550_TRANSMIT_BUFFER, ulBaudDivisor&0xff);
|
||||
(*setReg)(pNS16550, NS16550_INTERRUPT_ENABLE, (ulBaudDivisor>>8)&0xff);
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ int grlib_canbtrs_calc_timing(
|
||||
tseg++) {
|
||||
/* calculate scaler */
|
||||
tmp = ((br->divfactor + tseg) * baud);
|
||||
sc = (core_hz * 2)/ tmp - core_hz / tmp;
|
||||
/* Core frequency is always divided by 2 before scaler */
|
||||
sc = core_hz / (2 * tmp);
|
||||
if (sc <= 0 || sc > br->max_scaler)
|
||||
continue;
|
||||
if (br->has_bpr &&
|
||||
@@ -71,7 +72,7 @@ int grlib_canbtrs_calc_timing(
|
||||
((sc > 256 * 4) && (sc <= 256 * 8) && (sc & 0x7))))
|
||||
continue;
|
||||
|
||||
error = baud - core_hz / (sc * (br->divfactor + tseg));
|
||||
error = baud - core_hz / (2 * sc * (br->divfactor + tseg));
|
||||
#ifdef GRLIB_CANBTRS_DEBUG
|
||||
printf(" baud=%d, tseg=%d, sc=%d, error=%d\n",
|
||||
baud, tseg, sc, error);
|
||||
|
||||
@@ -1000,7 +1000,9 @@ static void convert_timing_to_btrs(
|
||||
{
|
||||
btrs->btr0 = (t->rsj << OCCAN_BUSTIM_SJW_BIT) |
|
||||
(t->scaler & OCCAN_BUSTIM_BRP);
|
||||
btrs->btr1 = (0<<7) | (t->ps2 << OCCAN_BUSTIM_TSEG2_BIT) | t->ps1;
|
||||
|
||||
/* Core adds +1 to the register values, so compensate here by decrementing */
|
||||
btrs->btr1 = (0<<7) | ((t->ps2-1) << OCCAN_BUSTIM_TSEG2_BIT) | (t->ps1-1);
|
||||
}
|
||||
|
||||
static int occan_set_speedregs(occan_priv *priv, occan_speed_regs *timing)
|
||||
|
||||
@@ -34,11 +34,11 @@ const rtems_assoc_t rtems_termios_baud_table [] = {
|
||||
{ "B1800", 1800, B1800 },
|
||||
{ "B2400", 2400, B2400 },
|
||||
{ "B4800", 4800, B4800 },
|
||||
{ "B7200", 7200, B7200 },
|
||||
{ "B9600", 9600, B9600 },
|
||||
{ "B14400", 14400, B14400 },
|
||||
{ "B19200", 19200, B19200 },
|
||||
{ "B38400", 38400, B38400 },
|
||||
{ "B7200", 7200, B7200 },
|
||||
{ "B14400", 14400, B14400 },
|
||||
{ "B28800", 28800, B28800 },
|
||||
{ "B57600", 57600, B57600 },
|
||||
{ "B76800", 76800, B76800 },
|
||||
|
||||
@@ -53,7 +53,7 @@ static int rtems_shell_main_chmod(
|
||||
* Now change the files modes
|
||||
*/
|
||||
for (n=2 ; n < argc ; n++)
|
||||
chmod(argv[n++], mode);
|
||||
chmod(argv[n], mode);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -407,6 +407,9 @@ static void move_gap(struct editor *ed, int pos, int minsize) {
|
||||
if (gapsize + MINEXTEND > minsize) minsize = gapsize + MINEXTEND;
|
||||
newsize = (ed->end - ed->start) - gapsize + minsize;
|
||||
start = (unsigned char *) malloc(newsize); // TODO check for out of memory
|
||||
if (start == NULL) {
|
||||
return;
|
||||
}
|
||||
gap = start + pos;
|
||||
rest = gap + minsize;
|
||||
end = start + newsize;
|
||||
@@ -1789,14 +1792,14 @@ static void save_editor(struct editor *ed) {
|
||||
ed->refresh = 1;
|
||||
}
|
||||
|
||||
static void close_editor(struct editor *ed) {
|
||||
static struct editor* close_editor(struct editor *ed) {
|
||||
struct env *env = ed->env;
|
||||
|
||||
if (ed->dirty) {
|
||||
display_message(ed, "Close %s without saving changes (y/n)? ", ed->filename);
|
||||
if (!ask()) {
|
||||
ed->refresh = 1;
|
||||
return;
|
||||
return ed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1808,6 +1811,7 @@ static void close_editor(struct editor *ed) {
|
||||
new_file(ed, "");
|
||||
}
|
||||
ed->refresh = 1;
|
||||
return ed;
|
||||
}
|
||||
|
||||
static void pipe_command(struct editor *ed) {
|
||||
@@ -2131,15 +2135,7 @@ static void edit(struct editor *ed) {
|
||||
case ctrl('s'): save_editor(ed); break;
|
||||
case ctrl('p'): pipe_command(ed); break;
|
||||
#endif
|
||||
#if defined(__rtems__)
|
||||
/*
|
||||
* Coverity spotted this as using ed after free() so changing
|
||||
* the order of the statements.
|
||||
*/
|
||||
case ctrl('w'): ed = ed->env->current; close_editor(ed); break;
|
||||
#else
|
||||
case ctrl('w'): close_editor(ed); ed = ed->env->current; break;
|
||||
#endif
|
||||
case ctrl('w'): ed = close_editor(ed); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user