fix output
This commit is contained in:
parent
ae7bcc5136
commit
4e1d77b4b1
8
main.c
8
main.c
@ -32,7 +32,7 @@
|
||||
* OUTPUT (active low) on PB0
|
||||
*/
|
||||
|
||||
/* RC5 bitlength is 1778us +/-10% convert to time0 ticks (8us) */
|
||||
/* RC5 bitlength is 1778us +/-10% convert to timer0 ticks (8us) */
|
||||
#define BITWIDTH (1778 / 8)
|
||||
#define BITWIDTH_MIN (BITWIDTH - (BITWIDTH / 10))
|
||||
#define BITWIDTH_MAX (BITWIDTH + (BITWIDTH / 10))
|
||||
@ -42,8 +42,8 @@
|
||||
#define RC5_COMPLETE 0x8000
|
||||
|
||||
#define PROGMODE_CHECK() (!(PINB & (1<<PINB1)))
|
||||
#define OUTPUT_ON() { PORTA &= ~(1<<PORTA0); }
|
||||
#define OUTPUT_OFF() { PORTA |= (1<<PORTA0); }
|
||||
#define OUTPUT_ON() { PORTB &= ~(1<<PORTB0); }
|
||||
#define OUTPUT_OFF() { PORTB |= (1<<PORTB0); }
|
||||
|
||||
struct ee_param {
|
||||
uint16_t rc5cmd;
|
||||
@ -103,6 +103,8 @@ ISR(TIM0_COMPB_vect)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
DDRB = (1<<PORTB0);
|
||||
|
||||
/* pullup on RC5IN and PROGMEM, OUTPUT is low active */
|
||||
PORTB = (1<<PORTB2) | (1<<PORTB1) | (1<<PORTB0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user