Commit 7f4d2da4 authored by Claes Sjofors's avatar Claes Sjofors

IO Gergboard compile fix

parent acdeeb09
...@@ -158,7 +158,7 @@ void setup_io() ...@@ -158,7 +158,7 @@ void setup_io()
else else
clk_mem = clk_mem_orig; clk_mem = clk_mem_orig;
clk_map = (unsigned char *)mmap( clk_map = (char *)mmap(
(caddr_t)clk_mem, (caddr_t)clk_mem,
BLOCK_SIZE, BLOCK_SIZE,
PROT_READ|PROT_WRITE, PROT_READ|PROT_WRITE,
...@@ -187,7 +187,7 @@ void setup_io() ...@@ -187,7 +187,7 @@ void setup_io()
else else
gpio_mem = gpio_mem_orig; gpio_mem = gpio_mem_orig;
gpio_map = (unsigned char *)mmap( gpio_map = (char *)mmap(
(caddr_t)gpio_mem, (caddr_t)gpio_mem,
BLOCK_SIZE, BLOCK_SIZE,
PROT_READ|PROT_WRITE, PROT_READ|PROT_WRITE,
...@@ -215,7 +215,7 @@ void setup_io() ...@@ -215,7 +215,7 @@ void setup_io()
else else
pwm_mem = pwm_mem_orig; pwm_mem = pwm_mem_orig;
pwm_map = (unsigned char *)mmap( pwm_map = (char *)mmap(
(caddr_t)pwm_mem, (caddr_t)pwm_mem,
BLOCK_SIZE, BLOCK_SIZE,
PROT_READ|PROT_WRITE, PROT_READ|PROT_WRITE,
...@@ -243,7 +243,7 @@ void setup_io() ...@@ -243,7 +243,7 @@ void setup_io()
else else
spi0_mem = spi0_mem_orig; spi0_mem = spi0_mem_orig;
spi0_map = (unsigned char *)mmap( spi0_map = (char *)mmap(
(caddr_t)spi0_mem, (caddr_t)spi0_mem,
BLOCK_SIZE, BLOCK_SIZE,
PROT_READ|PROT_WRITE, PROT_READ|PROT_WRITE,
...@@ -271,7 +271,7 @@ void setup_io() ...@@ -271,7 +271,7 @@ void setup_io()
else else
uart_mem = uart_mem_orig; uart_mem = uart_mem_orig;
uart_map = (unsigned char *)mmap( uart_map = (char *)mmap(
(caddr_t)uart_mem, (caddr_t)uart_mem,
BLOCK_SIZE, BLOCK_SIZE,
PROT_READ|PROT_WRITE, PROT_READ|PROT_WRITE,
......
...@@ -56,8 +56,8 @@ void setup_spi() ...@@ -56,8 +56,8 @@ void setup_spi()
// datasheet of the AD chip (MCP3002) // datasheet of the AD chip (MCP3002)
// //
int read_adc(int chan) // 'chan' must be 0 or 1. This is not checked! int read_adc(int chan) // 'chan' must be 0 or 1. This is not checked!
{ unsigned char v1,v2,rec_c; { unsigned char v1,v2;
int status,w; int status;
// Set up for single ended, MS comes out first // Set up for single ended, MS comes out first
v1 = 0xD0 | (chan<<5); v1 = 0xD0 | (chan<<5);
// Delay to make sure chip select is high for a short while // Delay to make sure chip select is high for a short while
......
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