Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / lib / firmware / carl9170fw / carlfw / include / | server ip : 172.67.156.115 your ip : 172.70.178.29 H O M E |
Filename | /lib/firmware/carl9170fw/carlfw/include/printf.h |
Size | 2.91 kb |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:50 |
Last modified | 05-Mar-2014 23:45 |
Last accessed | 27-Apr-2025 09:50 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
/*
* carl9170 firmware - used by the ar9170 wireless device
*
* printf and his friends...
*
* Copyright (c) 2000-2005 ZyDAS Technology Corporation
* Copyright (c) 2007-2009 Atheros Communications, Inc.
* Copyright 2009 Johannes Berg <[email protected]>
* Copyright 2009-2011 Christian Lamparter <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __CARL9170FW_PRINTF_H
#define __CARL9170FW_PRINTF_H
#include <stdarg.h>
#include <string.h>
#include "config.h"
#include "carl9170.h"
#include "uart.h"
#include "fwcmd.h"
#ifdef CONFIG_CARL9170FW_PRINTF
void __attribute__((format (printf, 1, 2))) tfp_printf(const char *fmt, ...);
#define printf tfp_printf
#else
void __attribute__((format (printf, 1, 2))) min_printf(const char *fmt, ...);
#define printf min_printf
#endif /* CONFIG_CARL9170FW_PRINTF */
#define PRINT(fmt, args...) \
do { \
printf(fmt, ## args); \
} while (0)
#define INFO(fmt, args...) PRINT(fmt, ## args)
#define ERR(fmt, args...) PRINT(CARL9170_ERR_MAGIC fmt, ## args)
#ifdef CONFIG_CARL9170FW_DEBUG
#define DBG(fmt, args...) PRINT(fmt, ## args)
#else
#define DBG(...) do { } while (0);
#endif
/*
* NB: even though the MACRO is called "stall". It isn't supposed
* to stall since this will render the device unresponsive, until
* someone pulls the plug.
*/
#define STALL()
#define BUG(fmt, args...) \
do { \
PRINT(CARL9170_BUG_MAGIC" %s()@%d \"" fmt "\"" , \
__func__, __LINE__, ## args); \
STALL() \
} while (0);
#define BUG_ON(condition) \
({ \
int __ret = !!(condition); \
if (unlikely(!!(__ret))) \
BUG(#condition); \
(__ret); \
})
static inline __inline void putcharacter(const char c __unused)
{
#ifdef CONFIG_CARL9170FW_DEBUG_USB
usb_putc(c);
#endif /* CONFIG_CARL9170FW_DEBUG_USB */
#ifdef CONFIG_CARL9170FW_DEBUG_UART
uart_putc(c);
#endif /* CONFIG_CARL9170FW_DEBUG_UART */
}
static inline __inline void print_hex_dump(const void *buf __unused, int len __unused)
{
#ifdef CONFIG_CARL9170FW_DEBUG_USB
usb_print_hex_dump(buf, len);
#endif /* CONFIG_CARL9170FW_DEBUG_USB */
#ifdef CONFIG_CARL9170FW_DEBUG_UART
uart_print_hex_dump(buf, len);
#endif /* CONFIG_CARL9170FW_DEBUG_UART */
}
#endif /* __CARL9170FW_PRINTF_H */
* carl9170 firmware - used by the ar9170 wireless device
*
* printf and his friends...
*
* Copyright (c) 2000-2005 ZyDAS Technology Corporation
* Copyright (c) 2007-2009 Atheros Communications, Inc.
* Copyright 2009 Johannes Berg <[email protected]>
* Copyright 2009-2011 Christian Lamparter <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __CARL9170FW_PRINTF_H
#define __CARL9170FW_PRINTF_H
#include <stdarg.h>
#include <string.h>
#include "config.h"
#include "carl9170.h"
#include "uart.h"
#include "fwcmd.h"
#ifdef CONFIG_CARL9170FW_PRINTF
void __attribute__((format (printf, 1, 2))) tfp_printf(const char *fmt, ...);
#define printf tfp_printf
#else
void __attribute__((format (printf, 1, 2))) min_printf(const char *fmt, ...);
#define printf min_printf
#endif /* CONFIG_CARL9170FW_PRINTF */
#define PRINT(fmt, args...) \
do { \
printf(fmt, ## args); \
} while (0)
#define INFO(fmt, args...) PRINT(fmt, ## args)
#define ERR(fmt, args...) PRINT(CARL9170_ERR_MAGIC fmt, ## args)
#ifdef CONFIG_CARL9170FW_DEBUG
#define DBG(fmt, args...) PRINT(fmt, ## args)
#else
#define DBG(...) do { } while (0);
#endif
/*
* NB: even though the MACRO is called "stall". It isn't supposed
* to stall since this will render the device unresponsive, until
* someone pulls the plug.
*/
#define STALL()
#define BUG(fmt, args...) \
do { \
PRINT(CARL9170_BUG_MAGIC" %s()@%d \"" fmt "\"" , \
__func__, __LINE__, ## args); \
STALL() \
} while (0);
#define BUG_ON(condition) \
({ \
int __ret = !!(condition); \
if (unlikely(!!(__ret))) \
BUG(#condition); \
(__ret); \
})
static inline __inline void putcharacter(const char c __unused)
{
#ifdef CONFIG_CARL9170FW_DEBUG_USB
usb_putc(c);
#endif /* CONFIG_CARL9170FW_DEBUG_USB */
#ifdef CONFIG_CARL9170FW_DEBUG_UART
uart_putc(c);
#endif /* CONFIG_CARL9170FW_DEBUG_UART */
}
static inline __inline void print_hex_dump(const void *buf __unused, int len __unused)
{
#ifdef CONFIG_CARL9170FW_DEBUG_USB
usb_print_hex_dump(buf, len);
#endif /* CONFIG_CARL9170FW_DEBUG_USB */
#ifdef CONFIG_CARL9170FW_DEBUG_UART
uart_print_hex_dump(buf, len);
#endif /* CONFIG_CARL9170FW_DEBUG_UART */
}
#endif /* __CARL9170FW_PRINTF_H */