Some bugfix
This commit is contained in:
parent
8a8e50dfb9
commit
72b06f49f1
6 changed files with 19 additions and 13 deletions
Binary file not shown.
|
@ -182,7 +182,7 @@ Reset_Handler:
|
|||
/* --+--+-+-+-+-+--------+-----+-------+-+---- */
|
||||
/* ldr r1, =0x10000400 /* 00|01|0|0|0|0|00000000|00000|1|00000|0|0000 16bit, rble, 3wst - 10 mhz*/
|
||||
/* ldr r1, =0x10000420 /* 00|01|0|0|0|0|00000000|00000|1|00001|0|0000 16bit, rble, 4wst - 30 mhz*/
|
||||
ldr r1, =0x100004A0 /* 00|01|0|0|0|0|00000000|00000|1|00101|0|0000 16bit, rble, 6wst - 60 mhz*/
|
||||
ldr r1, =0x10001CA0 /* 00|01|0|0|0|0|00000000|00101|1|00101|0|0000 16bit, rble, 6wst - 60 mhz*/
|
||||
|
||||
str r1,[r0] /* set bcfg0 (flash) */
|
||||
str r1,[r0,#0x08] /* set bcfg2 (flash) */
|
||||
|
|
|
@ -1 +1 @@
|
|||
/*
infrared codes for bang & olufsen
Copyright (C) 2017 <kölnsolar>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*pre_data*/ 0x00000000, // 2. start bit
/*post_data*/ 0x00000000,
/*toggle_bit_mask*/ 0x00,
/*gap*/ 18000, // final gap to prevent collision
/*repeat_gap*/ 0,
/*bits*/ 17, // last(4.) start bit logical low as first data bit ==> 1+16 data bits = 17
/*pre_data_bits*/ 1, // 2. start bit
/*post_data_bits*/ 0,
/*rc6_bit*/ 0,
/*frequency*/ 455000, // regular freq is 455kHz but to get a valid result 454,5 is used
/*flags*/ LIRC_BO,
/*header*/ 200,3125, // 1. start bit
/*three*/ 0,0,
/*two*/ 0,0,
/*one*/ 200,9375,
/*zero*/ 200,3125,
/*plead*/ 0,
/*ptrail*/ 200, // stop bit
/*foot*/ 0,0,
/*pre*/ 200,15625, //3. start bit
/*post*/ 200,12500, // post bit
/*repeat*/ 0,0,
/*min_repeat*/ 0,
/*duty cycle*/ 50,
{
0x0000, // A ->
0x0000, // B ->
0x0000, // C ->
0x0000, // D ->
0x0000, // Betty ->
0xB44B, // Exit -> Exit
0x06F9, // Up -> UP
0x8679, // Down -> Down
0xA659, // Left -> Left
0x46B9, // Right -> Right
0x16E9, // OK -> OK
0x0160, // Vol+ -> Vol+
0x0164, // Vol- -> Vol-
0xF00F, // Mute -> Mute
0x48B7, // Prog+ -> Prog+
0x48B7, // Prog- -> Prog-
0x0101, // 1 -> 1
0x0102, // 2 -> 2
0x609F, // 3 -> 3
0x10EF, // 4 -> 4
0x906F, // 5 -> 5
0x50AF, // 6 -> 6
0x30CF, // 7 -> 7
0xB04F, // 8 -> 8
0x708F, // 9 -> 9
0x8877, // 0 -> 0
0xF20D, // -/-- -> Guide
0x0181, // AV -> Source
0x0f0c, // Menu -> Menue
0xD22D, // PiP -> Tools
0x1AE5, // A/B -> Return
0x7C83, // 16:9 -> P.Size
0xF807, // Info -> Info
0xD629, // VTX1 -> Ch.List
0x0000, // VTX2 ->
0xC837, // VTX3 -> Pre-CH
0x6897, // Blue -> Blue
0xA857, // Yello -> Yellow
0x28D7, // Green -> Green
0x36C9, // Red -> Red
0xC23D, // TV -> TV/DTV
0x0f0C // Power -> Standby
},
|
||||
/*
infrared codes for bang & olufsen
Copyright (C) 2017 <kölnsolar>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*pre_data*/ 0x00000000, // 2. start bit
/*post_data*/ 0x00000000,
/*toggle_bit_mask*/ 0x00,
/*gap*/ 18000, // final gap to prevent collision
/*repeat_gap*/ 0,
/*bits*/ 17, // last(4.) start bit logical low as first data bit ==> 1+16 data bits = 17
/*pre_data_bits*/ 1, // 2. start bit
/*post_data_bits*/ 0,
/*rc6_bit*/ 0,
/*frequency*/ 455000, // regular freq is 455kHz but to get a valid result 454,5 is used
/*flags*/ LIRC_BO,
/*header*/ 200,3125, // 1. start bit
/*three*/ 0,0,
/*two*/ 0,0,
/*one*/ 200,9375,
/*zero*/ 200,3125,
/*plead*/ 0,
/*ptrail*/ 200, // stop bit
/*foot*/ 0,0,
/*pre*/ 200,15625, //3. start bit
/*post*/ 200,12500, // post bit
/*repeat*/ 0,0,
/*min_repeat*/ 0,
/*duty cycle*/ 30,
{
0x0000, // A ->
0x0000, // B ->
0x0000, // C ->
0x0000, // D ->
0x0000, // Betty ->
0xB44B, // Exit -> Exit
0x06F9, // Up -> UP
0x8679, // Down -> Down
0xA659, // Left -> Left
0x46B9, // Right -> Right
0x16E9, // OK -> OK
0x0160, // Vol+ -> Vol+
0x0164, // Vol- -> Vol-
0xF00F, // Mute -> Mute
0x48B7, // Prog+ -> Prog+
0x48B7, // Prog- -> Prog-
0x0101, // 1 -> 1
0x0102, // 2 -> 2
0x609F, // 3 -> 3
0x10EF, // 4 -> 4
0x906F, // 5 -> 5
0x50AF, // 6 -> 6
0x30CF, // 7 -> 7
0xB04F, // 8 -> 8
0x708F, // 9 -> 9
0x8877, // 0 -> 0
0xF20D, // -/-- -> Guide
0x0181, // AV -> Source
0x0f0c, // Menu -> Menue
0xD22D, // PiP -> Tools
0x1AE5, // A/B -> Return
0x7C83, // 16:9 -> P.Size
0xF807, // Info -> Info
0xD629, // VTX1 -> Ch.List
0x0000, // VTX2 ->
0xC837, // VTX3 -> Pre-CH
0x6897, // Blue -> Blue
0xA857, // Yello -> Yellow
0x28D7, // Green -> Green
0x36C9, // Red -> Red
0xC23D, // TV -> TV/DTV
0x0f0C // Power -> Standby
},
|
|
@ -165,11 +165,11 @@ void __attribute__ ((section(".text.fastcode"))) LIRC_Encode (void) {
|
|||
case LIRC_PRE_DAT_P:
|
||||
if(!has_repeat || !(ir.lirc.repeats)) {
|
||||
if(lirctable->pre_data_bits) {
|
||||
send_data(lirctable->pre_data,1);
|
||||
send_data(ir.lirc.pre_data,1);
|
||||
ir.state++;
|
||||
break;
|
||||
case LIRC_PRE_DAT_S:
|
||||
ir.lirc.pre_data <<= send_data(lirctable->pre_data,0);
|
||||
ir.lirc.pre_data <<= send_data(ir.lirc.pre_data,0);
|
||||
if(ir.lirc.bit >= lirctable->pre_data_bits)
|
||||
ir.state++;
|
||||
else
|
||||
|
@ -226,11 +226,11 @@ void __attribute__ ((section(".text.fastcode"))) LIRC_Encode (void) {
|
|||
}
|
||||
ir.state = LIRC_POST_DAT_P;
|
||||
case LIRC_POST_DAT_P:
|
||||
send_data(lirctable->post_data,1);
|
||||
send_data(ir.lirc.post_data,1);
|
||||
ir.state++;
|
||||
break;
|
||||
case LIRC_POST_DAT_S:
|
||||
ir.lirc.post_data <<= send_data(lirctable->post_data,0);
|
||||
ir.lirc.post_data <<= send_data(ir.lirc.post_data,0);
|
||||
if(ir.lirc.bit >= lirctable->pre_data_bits + lirctable->bits + lirctable->post_data_bits)
|
||||
ir.state = LIRC_TRAIL_P;
|
||||
else
|
||||
|
|
|
@ -66,6 +66,13 @@ void PWM_set_frequency(unsigned long f)
|
|||
}
|
||||
PWMLER |= 0x01; //Latch Enable
|
||||
|
||||
|
||||
if(f < 32000) {
|
||||
PWMMCR = 0x03;
|
||||
} else {
|
||||
PWMMCR = 0x02;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PWM_set_IR_duty_cycle(unsigned char d) {
|
||||
|
|
13
boop/main.c
13
boop/main.c
|
@ -88,8 +88,8 @@ void setSpeed(unsigned char sp)
|
|||
|
||||
VPBDIV = 0x00;
|
||||
|
||||
BCFG0 = 0x100004A0;
|
||||
BCFG2 = 0x100004A0;
|
||||
BCFG0 = 0x10001CA0;
|
||||
BCFG2 = 0x10001CA0;
|
||||
BCFG1 = 0x00000C21;
|
||||
sysInfo |= SYS_TURBO;
|
||||
break;
|
||||
|
@ -103,8 +103,8 @@ void setSpeed(unsigned char sp)
|
|||
|
||||
VPBDIV = 0x02;
|
||||
|
||||
BCFG0 = 0x10000420;
|
||||
BCFG2 = 0x10000420;
|
||||
BCFG0 = 0x10000A20;
|
||||
BCFG2 = 0x10000A20;
|
||||
BCFG1 = 0x00000400;
|
||||
sysInfo &= ~SYS_TURBO;
|
||||
break;
|
||||
|
@ -244,6 +244,7 @@ int main(void)
|
|||
FIOCLR0 |= (1<<4);
|
||||
|
||||
setSpeed(SPEED_60);
|
||||
BFS_Mount(); // flash file system
|
||||
|
||||
lcd_init(0);
|
||||
serial_init();
|
||||
|
@ -284,10 +285,8 @@ int main(void)
|
|||
|
||||
set_font(BOLDFONT);
|
||||
|
||||
BFS_Mount(); // flash file system
|
||||
load_RC_setting(); // learned remote codes
|
||||
load_setting(); // display settings
|
||||
|
||||
load_RC_setting(); // learned remote codes
|
||||
|
||||
// recorded raw IR commands
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue