uint16_t tc_write_rc(volatile avr32_tc_t *tc, unsigned int channel, uint16_t value) { // Check for valid input. if (channel >= TC_NUMBER_OF_CHANNELS) return TC_INVALID_ARGUMENT; // This function is only available in WAVEFORM mode. if (Tst_bits(tc->channel[channel].cmr, AVR32_TC_WAVE_MASK)) Wr_bitfield(tc->channel[channel].rc, AVR32_TC_RC_MASK, value); return value; }
//! //! This function returns a free navigator id. //! //! @return long : Id navigator allocated or -1 if none free //! long fsaccess_alloc_nav_id( void ) { unsigned int j; // get a free nav id // NOTE: we start at FS_NB_RESERVED_NAV, because 2 is usually used as // the navigator for file copy. 0 & 1 may be used independently of the fsaccess module. for (j = FS_NB_RESERVED_NAV ; j < FS_NB_NAVIGATOR ; j++) { if (!Tst_bits(pvNavUsed, (1 << j))) { Set_bits(pvNavUsed, (1 << j)); return (j); } } // no nav free for now return(-1); }
bool LED_Test(U32 leds) { return Tst_bits(LED_State, leds); }
bool LED_Test(uint32_t leds) { return Tst_bits(LED_State, leds); }