Commit 0a86f9e3 authored by Gaia Grosso's avatar Gaia Grosso
Browse files

Update functions.c

parent c8720ae4
##include <stdint.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
......@@ -40,7 +40,7 @@ int write_bits(char *device_loc, char *address, unsigned int writeval)
printf("address: 0x%08x\n", (unsigned int)target);
/* open device */
int fd = open(device_loc, O_RDWR | O_SYNC));
int fd = open(device_loc, O_RDWR | O_SYNC);
if (fd == -1) {
FATAL;
return -1;
......@@ -80,7 +80,7 @@ int read_bits(char *device_loc, char *address, uint32_t *read_result)
printf("address: 0x%08x\n", (unsigned int)target);
/* open device */
int fd = open(device_loc, O_RDWR | O_SYNC));
int fd = open(device_loc, O_RDWR | O_SYNC);
if ( fd == -1){
FATAL;
return -1;
......
Supports Markdown
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