Changeset 1973:4e6945223979 in roaraudio
- Timestamp:
- 06/12/09 03:00:22 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarlight/pwm.c
r1972 r1973 61 61 uint64_t s; 62 62 63 ROAR_DBG("roar_light_pwm_send(state=%p, vio=%p, len=%u) = ?", state, vio, len); 64 63 65 if ( state == NULL ) 64 66 return -1; … … 70 72 return -1; 71 73 74 if ( len == 0 ) 75 return 0; 76 72 77 if ( (buf = malloc(len)) == NULL ) 73 78 return -1; … … 76 81 77 82 while (todo > 1) { 83 ROAR_DBG("roar_light_pwm_send(*): loop: todo=%u, fill=%i", todo, state->fill); 84 78 85 if ( state->fill < 16 ) { 79 s = _g_roar_lpwm16[state->value]; 80 s <<= state->fill; 81 state->s |= s; 86 s = _g_roar_lpwm16[state->value]; 87 s <<= state->fill; 88 state->s |= s; 89 state->fill += 16; 82 90 } 83 91 … … 96 104 } 97 105 98 if ( roar_vio_ write(vio, buf, len) != len ) {106 if ( roar_vio_basic_write(vio, buf, len) != len ) { 99 107 free(buf); 100 108 return -1;
Note: See TracChangeset
for help on using the changeset viewer.