SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
The SimpleLink Wi-Fi device gives users the option to set, and get time and date configuration from the RTC on the device. The RTC is a continuous counter which is active even during hibernation and resets only after shutdown.
Example:
_i16 Status;
SlDateTime_t dateTime= {0};
dateTime.tm_day = (_u32)23; /* Day of month (DD format) range 1-31 */
dateTime.tm_mon = (_u32)6; /* Month (MM format) in the range of 1-12 */
dateTime.tm_year = (_u32)2014; /* Year (YYYY format) */
dateTime.tm_hour = (_u32)17; /* Hours in the range of 0-23 */
dateTime.tm_min = (_u32)55; /* Minutes in the range of 0-59 */
dateTime.tm_sec = (_u32)22; /* Seconds in the range of 0-59 */
Status = sl_DeviceSet(SL_DEVICE_GENERAL, SL_DEVICE_GENERAL_DATE_TIME, sizeof(SlDateTime_t), (_u8*)(&dateTime));
if( Status )
{
/* error */
}