Commit 8c1d6a3c authored by Erik Strand's avatar Erik Strand

Disable interrupts for put_char

parent c14adfdf
......@@ -16,7 +16,7 @@
#include <util/delay.h>
#include <avr/pgmspace.h>
#include "OneWire.h"
#include "OneWireMod.h"
#define output(directions,pin) (directions |= pin) // set port direction for output
#define set(port,pin) (port |= pin) // set port pin
......@@ -41,6 +41,7 @@
#define max_buffer 25
void put_char(volatile unsigned char *port, unsigned char pin, char txchar) {
noInterrupts();
//
// send character in txchar on port pin
// assumes line driver (inverts bits)
......@@ -101,6 +102,7 @@ void put_char(volatile unsigned char *port, unsigned char pin, char txchar) {
// char delay
//
bit_delay();
interrupts();
}
void put_string(volatile unsigned char *port, unsigned char pin, char *str) {
......@@ -146,6 +148,9 @@ void loop(void) {
PORTB |= led_pin;
//put_char(&serial_port, serial_pin_out, '1');
}
put_string(&serial_port, serial_pin_out, "hello world");
delay(500);
return;
byte i;
byte present = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment