ATSHA204 example module.
This file contains the main function and some helper functions.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
#include <string.h>
#include <stdio.h>
#include "asf.h"
#include "compiler.h"
#include "preprocessor.h"
#include "board.h"
#include "sysclk.h"
#include "sha204_example_led.h"
#include "sha204_example_log.h"
#include "sha204_timer.h"
#include "sha204_command_marshaling.h"
#include "sha204_lib_return_codes.h"
#include "security_xplained.h"
Functions | |
int | main (void) |
This function is the entry function for an example application that uses the SHA204 ASF component. More... | |
void | sha204_sleep_all (void) |
This function puts all devices to sleep. More... | |
int main | ( | void | ) |
This function is the entry function for an example application that uses the SHA204 ASF component.
References board_init(), sha204_mac_parameters::challenge, CHECKMAC_CLIENT_COMMAND_SIZE, CHECKMAC_COUNT, CHECKMAC_OTHER_DATA_SIZE, sha204_check_mac_parameters::client_challenge, sha204_check_mac_parameters::client_response, sha204_check_mac_parameters::key_id, sha204_mac_parameters::key_id, led_display_number(), log_init(), log_sha204(), log_sha204_title(), MAC_CHALLENGE_SIZE, sha204_check_mac_parameters::mode, sha204_mac_parameters::mode, sha204_random_parameters::mode, sha204_check_mac_parameters::other_data, sha204_check_mac_parameters::rx_buffer, sha204_mac_parameters::rx_buffer, sha204_random_parameters::rx_buffer, SHA204_BUFFER_POS_DATA, SHA204_BUFFER_POS_STATUS, SHA204_COUNT_IDX, sha204_i2c_address(), SHA204_OPCODE_IDX, SHA204_RSP_SIZE_MAX, sha204_sleep_all(), SHA204_SUCCESS, sha204h_delay_ms(), sha204m_check_mac(), sha204m_mac(), sha204m_random(), sha204p_set_device_id(), sha204p_wakeup(), sysclk_init(), sha204_check_mac_parameters::tx_buffer, sha204_mac_parameters::tx_buffer, and sha204_random_parameters::tx_buffer.
void sha204_sleep_all | ( | void | ) |
This function puts all devices to sleep.
References SHA204_DEVICE_COUNT, sha204_i2c_address(), sha204p_set_device_id(), and sha204p_sleep().
Referenced by main().