Subversion Repositories Projects

Rev

Rev 213 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
259 dhylands 1
/****************************************************************************
2
*
3
*   Copyright (c) 2009 Dave Hylands     <dhylands@gmail.com>
4
*
5
*   This program is free software; you can redistribute it and/or modify
6
*   it under the terms of the GNU General Public License version 2 as
7
*   published by the Free Software Foundation.
8
*
9
*   Alternatively, this software may be distributed under the terms of BSD
10
*   license.
11
*
12
*   See README and COPYING for more details.
13
*
14
****************************************************************************/
15
/**
16
*
17
*   @file   pgmspace-fix.h
18
*
19
*   @brief  Provides a workaround which allows PSTR to be used from C++
20
*           without generating any warnings.
21
*
22
*****************************************************************************/
23
 
24
#if !defined( PGMSPACE_FIX_H )
25
#define PGMSPACE_FIX_H
26
 
27
#include <avr/pgmspace.h>
28
 
29
#define PROGMEM_SECTION __attribute__(( section(".progmem.data") ))
30
 
31
#undef PSTR
32
#define PSTR(s) (__extension__({static char __c[] PROGMEM_SECTION = (s); &__c[0];}))
33
 
34
#endif  // PGMSPACE_FIX_H
35