void codsp_write_sop_int(int duslic_id, int channel, unsigned char regno, unsigned int val)
{
- unsigned char cmd[5];
+ unsigned char cmd[6];
cmd[0] = CODSP_WR | CODSP_ADR(channel) | CODSP_CMD_SOP;
cmd[1] = regno;
void codsp_write_cop_short(int duslic_id, int channel, unsigned char addr, unsigned short val)
{
- unsigned char cmd[3];
+ unsigned char cmd[4];
cmd[0] = CODSP_WR | CODSP_OP | CODSP_ADR(channel) | CODSP_CMD_COP;
cmd[1] = addr;
void codsp_write_pop_int (int duslic_id, int channel, unsigned char regno,
unsigned int val)
{
- unsigned char cmd[5];
+ unsigned char cmd[6];
cmd[0] = CODSP_WR | CODSP_ADR (channel) | CODSP_CMD_POP;
cmd[1] = regno;
volatile iop8xx_t *iop = &immap->im_ioport;
timers->cpmt_tgcr &= 0x0FFF; SYNC; /* Disable Timer 4 */
- immap->im_cpm.cp_scc[4].scc_gsmrl = 0x0; SYNC; /* Disable SCC4 */
+ immap->im_cpm.cp_scc[3].scc_gsmrl = 0x0; SYNC; /* Disable SCC4 */
iop->iop_pdpar &= 0x3FFF; SYNC; /* Disable SAR and UTOPIA */
if ( atmMemInit() != OK ) return ERROR;
volatile iop8xx_t *iop = &immap->im_ioport;
timers->cpmt_tgcr &= 0x0FFF; SYNC; /* Disable Timer 4 */
- immap->im_cpm.cp_scc[4].scc_gsmrl = 0x0; SYNC; /* Disable SCC4 */
+ immap->im_cpm.cp_scc[3].scc_gsmrl = 0x0; SYNC; /* Disable SCC4 */
iop->iop_pdpar &= 0x3FFF; SYNC; /* Disable SAR and UTOPIA */
g_atm.loaded = FALSE;
}
void setPeriod (tid_8xx_cpmtimer_t *hwp, ulong interval);
-static char *usage = "\n[q, b, e, ?] ";
+static const char usage[] = "\n[q, b, e, ?] ";
int timer (int argc, char * const argv[])
{
/* clear all events */
*hwp->terp = (CPMT_EVENT_CAP | CPMT_EVENT_REF);
- printf (usage);
+ puts(usage);
running = 0;
while ((c = getc()) != 'q') {
if (c == 'b') {
} else {
printf ("\nEnter: q - quit, b - start timer, e - stop timer, ? - get status\n");
}
- printf (usage);
+ puts(usage);
}
if (running) {
printf ("Stopping timer\n");