# Copyright 2017-2019, 2025 NXP
# SPDX-License-Identifier: BSD-3-Clause
"""
Copyright 2015 Freescale Semiconductor, Inc.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * 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.
    * Neither the name of Freescale Semiconductor 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 Freescale Semiconductor "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 Freescale Semiconductor 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.

"""

CMD_CW_PREFIX = "cw"
CMD_CW_FP_SERVICES = CMD_CW_PREFIX + "Flash"

CMD_CW_FLASH_PREFIX = 'fl_'
CMD_CW_FLASH_BASE = ''.join([CMD_CW_FLASH_PREFIX, 'base'])
CMD_CW_FLASH_WRITE = ''.join([CMD_CW_FLASH_PREFIX, 'write'])
CMD_CW_FLASH_DUMP = ''.join([CMD_CW_FLASH_PREFIX, 'dump'])
CMD_CW_FLASH_ERASE = ''.join([CMD_CW_FLASH_PREFIX, 'erase'])
CMD_CW_FLASH_ERASE_ALL = ''.join([CMD_CW_FLASH_PREFIX, 'erase_all'])
CMD_CW_FLASH_PROTECT = ''.join([CMD_CW_FLASH_PREFIX, 'protect'])
CMD_CW_FLASH_UNPROTECT = ''.join([CMD_CW_FLASH_PREFIX, 'unprotect'])
CMD_CW_FLASH_CURRENT = ''.join([CMD_CW_FLASH_PREFIX, 'current'])
CMD_CW_FLASH_INFO = ''.join([CMD_CW_FLASH_PREFIX, 'info'])
CMD_CW_FLASH_BLANK_CHECK = ''.join([CMD_CW_FLASH_PREFIX, 'blankcheck'])
CMD_CW_FLASH_WRITE_ELF = ''.join([CMD_CW_FLASH_PREFIX, 'write_elf'])
CMD_CW_FLASH_CLOSE = ''.join([CMD_CW_FLASH_PREFIX, 'close'])
