/[gxemul]/trunk/src/devices/dev_iq80321_7seg.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_iq80321_7seg.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by dpavlin, Mon Oct 8 16:21:17 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: dev_iq80321_7seg.c,v 1.3 2006/12/30 13:30:58 debug Exp $   *  $Id: dev_iq80321_7seg.c,v 1.4 2007/06/15 19:11:15 debug Exp $
29   *   *
30   *  IQ80321 LED device. Should work with NetBSD's iq80321_7seg.c.   *  COMMENT: IQ80321 LED device
31     *
32     *  Should work with NetBSD's iq80321_7seg.c.
33   *   *
34   *  TODO: Graphical output of LED lines?   *  TODO: Graphical output of LED lines?
35   */   */
# Line 48  struct iq80321_7seg_data { Line 50  struct iq80321_7seg_data {
50  };  };
51    
52    
 /*  
  *  dev_iq80321_7seg_access():  
  */  
53  DEVICE_ACCESS(iq80321_7seg)  DEVICE_ACCESS(iq80321_7seg)
54  {  {
55          struct iq80321_7seg_data *d = extra;          struct iq80321_7seg_data *d = extra;
# Line 99  DEVICE_ACCESS(iq80321_7seg) Line 98  DEVICE_ACCESS(iq80321_7seg)
98    
99  DEVINIT(iq80321_7seg)  DEVINIT(iq80321_7seg)
100  {  {
101          struct iq80321_7seg_data *d = malloc(sizeof(struct iq80321_7seg_data));          struct iq80321_7seg_data *d;
102          if (d == NULL) {  
103                  fprintf(stderr, "out of memory\n");          CHECK_ALLOCATION(d = malloc(sizeof(struct iq80321_7seg_data)));
                 exit(1);  
         }  
104          memset(d, 0, sizeof(struct iq80321_7seg_data));          memset(d, 0, sizeof(struct iq80321_7seg_data));
105    
106          /*  0xfe840000 and 0xfe850000  */          /*  0xfe840000 and 0xfe850000  */

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26