Changeset acc0efb in mainline for uspace/lib/c/generic/ddi.c


Ignore:
Timestamp:
2012-10-15T13:33:45Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9727b92
Parents:
5b082ba9
Message:

libc: Implement pio tracing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/ddi.c

    r5b082ba9 racc0efb  
    3434
    3535#include <assert.h>
     36#include <atomic.h>
    3637#include <unistd.h>
     38#include <stdio.h>
    3739#include <errno.h>
    3840#include <sys/types.h>
     
    4648#include <libarch/config.h>
    4749#include "private/libc.h"
     50
    4851
    4952/** Return unique device number.
     
    171174void pio_write_8(ioport8_t *reg, uint8_t val)
    172175{
     176        pio_trace_log(reg, val, true);
    173177        arch_pio_write_8(reg, val);
    174178}
     
    176180void pio_write_16(ioport16_t *reg, uint16_t val)
    177181{
     182        pio_trace_log(reg, val, true);
    178183        arch_pio_write_16(reg, val);
    179184}
     
    181186void pio_write_32(ioport32_t *reg, uint32_t val)
    182187{
     188        pio_trace_log(reg, val, true);
    183189        arch_pio_write_32(reg, val);
    184190}
     
    186192uint8_t pio_read_8(ioport8_t *reg)
    187193{
    188         return arch_pio_read_8(reg);
     194        const uint8_t val = arch_pio_read_8(reg);
     195        pio_trace_log(reg, val, false);
     196        return val;
    189197}
    190198
    191199uint16_t pio_read_16(ioport16_t *reg)
    192200{
    193         return arch_pio_read_16(reg);
     201        const uint16_t val = arch_pio_read_16(reg);
     202        pio_trace_log(reg, val, false);
     203        return val;
    194204}
    195205
    196206uint32_t pio_read_32(ioport32_t *reg)
    197207{
    198         return arch_pio_read_32(reg);
     208        const uint32_t val = arch_pio_read_32(reg);
     209        pio_trace_log(reg, val, false);
     210        return val;
    199211}
    200212
Note: See TracChangeset for help on using the changeset viewer.