ConfigDlg.h
/*
* Copyright (c) 2013-15, Freescale Semiconductor, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* o Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* o Neither the name of Freescale Semiconductor, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include "afxwin.h"
// ConfigDlg Dialog
class ConfigDlg : public CDialogEx
{
DECLARE_DYNAMIC(ConfigDlg)
public:
ConfigDlg(CWnd *pParent = NULL); // standard constructor
virtual ~ConfigDlg();
// Dialog Data
#ifdef AFX_DESIGN_TIME
enum
{
IDD = IDD_DIALOG_CONFIG
};
#endif
protected:
virtual void DoDataExchange(CDataExchange *pDX); // DDX/DDV support
DECLARE_MESSAGE_MAP()
virtual void OnOK();
virtual void OnCancel();
public:
virtual BOOL OnInitDialog();
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
afx_msg void OnSelchangeComboFile();
afx_msg void OnKillfocusComboFile();
afx_msg void OnBnClickedButtonBrowse();
afx_msg void OnChangeEditBcaData();
afx_msg void OnBnClickedButtonConfigBca();
afx_msg void OnBnClickedButtonSaveBca();
public:
void RefreshImageFileList();
BOOL ReadBootloaderConfigureArea();
void UpdateDataOfBootloaderConfigureArea(BOOL direction);
void WriteBootloaderConfigureArea();
void ResetBootloaderConfigureArea();
public:
CComboBox m_ctrlImageFile;
CString m_bcaBinaries;
char *m_bcaData;
};
ConfigDlg::RefreshImageFileList
void RefreshImageFileList()
Refresh the image file list.
Definition: ConfigDlg.cpp:115
ConfigDlg::m_bcaBinaries
CString m_bcaBinaries
A string variable for the Edit Control, IDC_EDIT_BCA_BINARY.
Definition: ConfigDlg.h:98
ConfigDlg::m_bcaData
char * m_bcaData
A pointer, pointing to a memory region that contains BCA binaries.
Definition: ConfigDlg.h:99
ConfigDlg::m_ctrlImageFile
CComboBox m_ctrlImageFile
A control variable for the Combox, IDC_COMBO_FILE2.
Definition: ConfigDlg.h:97
ConfigDlg::ReadBootloaderConfigureArea
BOOL ReadBootloaderConfigureArea()
Read BCA data from image file to memory region(m_bcaData).
Definition: ConfigDlg.cpp:151
ConfigDlg::UpdateDataOfBootloaderConfigureArea
void UpdateDataOfBootloaderConfigureArea(BOOL direction)
Update BCA data between memory region and UI.
Definition: ConfigDlg.cpp:184
ConfigDlg::ResetBootloaderConfigureArea
void ResetBootloaderConfigureArea()
Reset BCA data to all 0xFFs.
Definition: ConfigDlg.cpp:259
ConfigDlg
ConfigDlg class is the UI Dialog class for the BCA utilities tab page.
Definition: ConfigDlg.h:39
ConfigDlg::WriteBootloaderConfigureArea
void WriteBootloaderConfigureArea()
Write BCA data to image file.
Definition: ConfigDlg.cpp:241
ConfigDlg::DoDataExchange
virtual void DoDataExchange(CDataExchange *pDX)
Generated message map functions.
Definition: ConfigDlg.cpp:63