Changeset 5916:39c3ed2d8a40 in roaraudio


Ignore:
Timestamp:
09/09/13 13:12:31 (6 years ago)
Author:
phi
Branch:
default
Message:

some type cleanup

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/include/light.h

    r5823 r5916  
    3535extern struct light_state { 
    3636 unsigned int    channels; 
    37  unsigned char * state; 
    38  unsigned char * changes; 
     37 uint8_t * state; 
     38 uint8_t * changes; 
    3939} g_light_state; 
    4040 
     
    5555// for plugins: 
    5656int light_dmxchannel_get(size_t index); 
    57 int light_dmxchannel_set(size_t index, unsigned char val); 
     57int light_dmxchannel_set(size_t index, uint8_t val); 
    5858 
    5959#endif 
  • roard/light.c

    r5823 r5916  
    3333// // 
    3434 
    35 static inline void __set_channel(size_t index, unsigned char val) { 
     35static inline void __set_channel(size_t index, uint8_t val) { 
    3636 g_light_state.changes[index] |= g_light_state.state[index] ^ val; 
    3737 g_light_state.state[index]    =                              val; 
     
    128128 int i, c; 
    129129 uint16_t      channel; 
    130  unsigned char value; 
     130 uint8_t value; 
    131131 
    132132 if ( g_streams[id] == NULL ) 
     
    189189 struct roar_stream        *   s; 
    190190 struct roar_stream_server *  ss; 
    191  unsigned char buf[512]; 
    192  register unsigned char * bufptr; 
     191 uint8_t buf[512]; 
     192 register uint8_t * bufptr; 
    193193 struct roar_roardmx_message  mes; 
    194194 int i; 
     
    267267 } 
    268268 
    269  return (int)(unsigned int)(unsigned char)g_light_state.state[index]; 
    270 } 
    271  
    272 int light_dmxchannel_set(size_t index, unsigned char val) { 
     269 return (int)(unsigned int)(uint8_t)g_light_state.state[index]; 
     270} 
     271 
     272int light_dmxchannel_set(size_t index, uint8_t val) { 
    273273 if ( (size_t)g_light_state.channels <= index ) { 
    274274  roar_err_set(ROAR_ERROR_NOENT); 
Note: See TracChangeset for help on using the changeset viewer.