Copyright | Copyright (C) 2015-2021 Swift Navigation Inc. |
---|---|
License | MIT |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
< Messages for reading/writing the device's onboard flash memory. Many of these messages target specific flash memory peripherals used in Swift Navigation devices: the STM32 flash and the M25Pxx FPGA configuration flash from Piksi 2.3.1. This module does not apply to Piksi Multi. >
Synopsis
- data MsgFlashProgram = MsgFlashProgram {}
- msgFlashProgram :: Word16
- data MsgFlashDone = MsgFlashDone {}
- msgFlashProgram_addr_len :: Lens' MsgFlashProgram Word8
- msgFlashProgram_addr_start :: Lens' MsgFlashProgram [Word8]
- msgFlashProgram_data :: Lens' MsgFlashProgram [Word8]
- msgFlashProgram_target :: Lens' MsgFlashProgram Word8
- msgFlashDone :: Word16
- data MsgFlashReadReq = MsgFlashReadReq {}
- msgFlashDone_response :: Iso' MsgFlashDone Word8
- msgFlashReadReq :: Word16
- data MsgFlashReadResp = MsgFlashReadResp {}
- msgFlashReadReq_addr_len :: Lens' MsgFlashReadReq Word8
- msgFlashReadReq_addr_start :: Lens' MsgFlashReadReq [Word8]
- msgFlashReadReq_target :: Lens' MsgFlashReadReq Word8
- msgFlashReadResp :: Word16
- data MsgFlashErase = MsgFlashErase {}
- msgFlashReadResp_addr_len :: Lens' MsgFlashReadResp Word8
- msgFlashReadResp_addr_start :: Lens' MsgFlashReadResp [Word8]
- msgFlashReadResp_target :: Lens' MsgFlashReadResp Word8
- msgFlashErase :: Word16
- data MsgStmFlashLockSector = MsgStmFlashLockSector {}
- msgFlashErase_sector_num :: Lens' MsgFlashErase Word32
- msgFlashErase_target :: Lens' MsgFlashErase Word8
- msgStmFlashLockSector :: Word16
- data MsgStmFlashUnlockSector = MsgStmFlashUnlockSector {}
- msgStmFlashLockSector_sector :: Iso' MsgStmFlashLockSector Word32
- msgStmFlashUnlockSector :: Word16
- data MsgStmUniqueIdReq = MsgStmUniqueIdReq
- msgStmFlashUnlockSector_sector :: Iso' MsgStmFlashUnlockSector Word32
- msgStmUniqueIdReq :: Word16
- data MsgStmUniqueIdResp = MsgStmUniqueIdResp {}
- msgStmUniqueIdResp :: Word16
- data MsgM25FlashWriteStatus = MsgM25FlashWriteStatus {}
- msgStmUniqueIdResp_stm_id :: Iso' MsgStmUniqueIdResp [Word8]
- msgM25FlashWriteStatus :: Word16
- msgM25FlashWriteStatus_status :: Iso' MsgM25FlashWriteStatus [Word8]
Documentation
data MsgFlashProgram Source #
SBP class for message MSG_FLASH_PROGRAM (0x00E6).
The flash program message programs a set of addresses of either the STM or M25 flash. The device replies with either a MSG_FLASH_DONE message containing the return code FLASH_OK (0) on success, or FLASH_INVALID_LEN (2) if the maximum write size is exceeded. Note that the sector-containing addresses must be erased before addresses can be programmed.
MsgFlashProgram | |
|
Instances
Eq MsgFlashProgram Source # | |
Defined in SwiftNav.SBP.Flash (==) :: MsgFlashProgram -> MsgFlashProgram -> Bool # (/=) :: MsgFlashProgram -> MsgFlashProgram -> Bool # | |
Read MsgFlashProgram Source # | |
Defined in SwiftNav.SBP.Flash | |
Show MsgFlashProgram Source # | |
Defined in SwiftNav.SBP.Flash showsPrec :: Int -> MsgFlashProgram -> ShowS # show :: MsgFlashProgram -> String # showList :: [MsgFlashProgram] -> ShowS # | |
ToJSON MsgFlashProgram Source # | |
Defined in SwiftNav.SBP.Flash toJSON :: MsgFlashProgram -> Value # toEncoding :: MsgFlashProgram -> Encoding # toJSONList :: [MsgFlashProgram] -> Value # toEncodingList :: [MsgFlashProgram] -> Encoding # | |
FromJSON MsgFlashProgram Source # | |
Defined in SwiftNav.SBP.Flash parseJSON :: Value -> Parser MsgFlashProgram # parseJSONList :: Value -> Parser [MsgFlashProgram] # | |
Binary MsgFlashProgram Source # | |
Defined in SwiftNav.SBP.Flash | |
ToSBP MsgFlashProgram Source # | |
Defined in SwiftNav.SBP.Flash |
data MsgFlashDone Source #
SBP class for message MSG_FLASH_DONE (0x00E0).
This message defines success or failure codes for a variety of flash memory requests from the host to the device. Flash read and write messages, such as MSG_FLASH_READ_REQ, or MSG_FLASH_PROGRAM, may return this message on failure.
MsgFlashDone | |
|
Instances
Eq MsgFlashDone Source # | |
Defined in SwiftNav.SBP.Flash (==) :: MsgFlashDone -> MsgFlashDone -> Bool # (/=) :: MsgFlashDone -> MsgFlashDone -> Bool # | |
Read MsgFlashDone Source # | |
Defined in SwiftNav.SBP.Flash readsPrec :: Int -> ReadS MsgFlashDone # readList :: ReadS [MsgFlashDone] # | |
Show MsgFlashDone Source # | |
Defined in SwiftNav.SBP.Flash showsPrec :: Int -> MsgFlashDone -> ShowS # show :: MsgFlashDone -> String # showList :: [MsgFlashDone] -> ShowS # | |
ToJSON MsgFlashDone Source # | |
Defined in SwiftNav.SBP.Flash toJSON :: MsgFlashDone -> Value # toEncoding :: MsgFlashDone -> Encoding # toJSONList :: [MsgFlashDone] -> Value # toEncodingList :: [MsgFlashDone] -> Encoding # | |
FromJSON MsgFlashDone Source # | |
Defined in SwiftNav.SBP.Flash parseJSON :: Value -> Parser MsgFlashDone # parseJSONList :: Value -> Parser [MsgFlashDone] # | |
Binary MsgFlashDone Source # | |
Defined in SwiftNav.SBP.Flash | |
ToSBP MsgFlashDone Source # | |
Defined in SwiftNav.SBP.Flash |
data MsgFlashReadReq Source #
SBP class for message MSG_FLASH_READ_REQ (0x00E7).
The flash read message reads a set of addresses of either the STM or M25 onboard flash. The device replies with a MSG_FLASH_READ_RESP message containing either the read data on success or a MSG_FLASH_DONE message containing the return code FLASH_INVALID_LEN (2) if the maximum read size is exceeded or FLASH_INVALID_ADDR (3) if the address is outside of the allowed range.
MsgFlashReadReq | |
|
Instances
Eq MsgFlashReadReq Source # | |
Defined in SwiftNav.SBP.Flash (==) :: MsgFlashReadReq -> MsgFlashReadReq -> Bool # (/=) :: MsgFlashReadReq -> MsgFlashReadReq -> Bool # | |
Read MsgFlashReadReq Source # | |
Defined in SwiftNav.SBP.Flash | |
Show MsgFlashReadReq Source # | |
Defined in SwiftNav.SBP.Flash showsPrec :: Int -> MsgFlashReadReq -> ShowS # show :: MsgFlashReadReq -> String # showList :: [MsgFlashReadReq] -> ShowS # | |
ToJSON MsgFlashReadReq Source # | |
Defined in SwiftNav.SBP.Flash toJSON :: MsgFlashReadReq -> Value # toEncoding :: MsgFlashReadReq -> Encoding # toJSONList :: [MsgFlashReadReq] -> Value # toEncodingList :: [MsgFlashReadReq] -> Encoding # | |
FromJSON MsgFlashReadReq Source # | |
Defined in SwiftNav.SBP.Flash parseJSON :: Value -> Parser MsgFlashReadReq # parseJSONList :: Value -> Parser [MsgFlashReadReq] # | |
Binary MsgFlashReadReq Source # | |
Defined in SwiftNav.SBP.Flash | |
ToSBP MsgFlashReadReq Source # | |
Defined in SwiftNav.SBP.Flash |
data MsgFlashReadResp Source #
SBP class for message MSG_FLASH_READ_RESP (0x00E1).
The flash read message reads a set of addresses of either the STM or M25 onboard flash. The device replies with a MSG_FLASH_READ_RESP message containing either the read data on success or a MSG_FLASH_DONE message containing the return code FLASH_INVALID_LEN (2) if the maximum read size is exceeded or FLASH_INVALID_ADDR (3) if the address is outside of the allowed range.
MsgFlashReadResp | |
|
Instances
Eq MsgFlashReadResp Source # | |
Defined in SwiftNav.SBP.Flash (==) :: MsgFlashReadResp -> MsgFlashReadResp -> Bool # (/=) :: MsgFlashReadResp -> MsgFlashReadResp -> Bool # | |
Read MsgFlashReadResp Source # | |
Defined in SwiftNav.SBP.Flash | |
Show MsgFlashReadResp Source # | |
Defined in SwiftNav.SBP.Flash showsPrec :: Int -> MsgFlashReadResp -> ShowS # show :: MsgFlashReadResp -> String # showList :: [MsgFlashReadResp] -> ShowS # | |
ToJSON MsgFlashReadResp Source # | |
Defined in SwiftNav.SBP.Flash toJSON :: MsgFlashReadResp -> Value # toEncoding :: MsgFlashReadResp -> Encoding # toJSONList :: [MsgFlashReadResp] -> Value # toEncodingList :: [MsgFlashReadResp] -> Encoding # | |
FromJSON MsgFlashReadResp Source # | |
Defined in SwiftNav.SBP.Flash parseJSON :: Value -> Parser MsgFlashReadResp # parseJSONList :: Value -> Parser [MsgFlashReadResp] # | |
Binary MsgFlashReadResp Source # | |
Defined in SwiftNav.SBP.Flash | |
ToSBP MsgFlashReadResp Source # | |
Defined in SwiftNav.SBP.Flash |
data MsgFlashErase Source #
SBP class for message MSG_FLASH_ERASE (0x00E2).
The flash erase message from the host erases a sector of either the STM or M25 onboard flash memory. The device will reply with a MSG_FLASH_DONE message containing the return code - FLASH_OK (0) on success or FLASH_INVALID_FLASH (1) if the flash specified is invalid.
MsgFlashErase | |
|
Instances
Eq MsgFlashErase Source # | |
Defined in SwiftNav.SBP.Flash (==) :: MsgFlashErase -> MsgFlashErase -> Bool # (/=) :: MsgFlashErase -> MsgFlashErase -> Bool # | |
Read MsgFlashErase Source # | |
Defined in SwiftNav.SBP.Flash readsPrec :: Int -> ReadS MsgFlashErase # readList :: ReadS [MsgFlashErase] # | |
Show MsgFlashErase Source # | |
Defined in SwiftNav.SBP.Flash showsPrec :: Int -> MsgFlashErase -> ShowS # show :: MsgFlashErase -> String # showList :: [MsgFlashErase] -> ShowS # | |
ToJSON MsgFlashErase Source # | |
Defined in SwiftNav.SBP.Flash toJSON :: MsgFlashErase -> Value # toEncoding :: MsgFlashErase -> Encoding # toJSONList :: [MsgFlashErase] -> Value # toEncodingList :: [MsgFlashErase] -> Encoding # | |
FromJSON MsgFlashErase Source # | |
Defined in SwiftNav.SBP.Flash parseJSON :: Value -> Parser MsgFlashErase # parseJSONList :: Value -> Parser [MsgFlashErase] # | |
Binary MsgFlashErase Source # | |
Defined in SwiftNav.SBP.Flash | |
ToSBP MsgFlashErase Source # | |
Defined in SwiftNav.SBP.Flash |
data MsgStmFlashLockSector Source #
SBP class for message MSG_STM_FLASH_LOCK_SECTOR (0x00E3).
The flash lock message locks a sector of the STM flash memory. The device replies with a MSG_FLASH_DONE message.
MsgStmFlashLockSector | |
|
Instances
data MsgStmFlashUnlockSector Source #
SBP class for message MSG_STM_FLASH_UNLOCK_SECTOR (0x00E4).
The flash unlock message unlocks a sector of the STM flash memory. The device replies with a MSG_FLASH_DONE message.
MsgStmFlashUnlockSector | |
|
Instances
Eq MsgStmFlashUnlockSector Source # | |
Defined in SwiftNav.SBP.Flash | |
Read MsgStmFlashUnlockSector Source # | |
Show MsgStmFlashUnlockSector Source # | |
Defined in SwiftNav.SBP.Flash showsPrec :: Int -> MsgStmFlashUnlockSector -> ShowS # show :: MsgStmFlashUnlockSector -> String # showList :: [MsgStmFlashUnlockSector] -> ShowS # | |
ToJSON MsgStmFlashUnlockSector Source # | |
Defined in SwiftNav.SBP.Flash | |
FromJSON MsgStmFlashUnlockSector Source # | |
Defined in SwiftNav.SBP.Flash | |
Binary MsgStmFlashUnlockSector Source # | |
Defined in SwiftNav.SBP.Flash put :: MsgStmFlashUnlockSector -> Put # get :: Get MsgStmFlashUnlockSector # putList :: [MsgStmFlashUnlockSector] -> Put # | |
ToSBP MsgStmFlashUnlockSector Source # | |
Defined in SwiftNav.SBP.Flash |
data MsgStmUniqueIdReq Source #
SBP class for message MSG_STM_UNIQUE_ID_REQ (0x00E8).
This message reads the device's hard-coded unique ID. The host requests the ID by sending a MSG_STM_UNIQUE_ID_REQ. The device responds with a MSG_STM_UNIQUE_ID_RESP with the 12-byte unique ID in the payload.
Instances
data MsgStmUniqueIdResp Source #
SBP class for message MSG_STM_UNIQUE_ID_RESP (0x00E5).
This message reads the device's hard-coded unique ID. The host requests the ID by sending a MSG_STM_UNIQUE_ID_REQ. The device responds with a MSG_STM_UNIQUE_ID_RESP with the 12-byte unique ID in the payload.
MsgStmUniqueIdResp | |
|
Instances
data MsgM25FlashWriteStatus Source #
SBP class for message MSG_M25_FLASH_WRITE_STATUS (0x00F3).
The flash status message writes to the 8-bit M25 flash status register. The device replies with a MSG_FLASH_DONE message.
MsgM25FlashWriteStatus | |
|
Instances
Eq MsgM25FlashWriteStatus Source # | |
Defined in SwiftNav.SBP.Flash | |
Read MsgM25FlashWriteStatus Source # | |
Defined in SwiftNav.SBP.Flash | |
Show MsgM25FlashWriteStatus Source # | |
Defined in SwiftNav.SBP.Flash showsPrec :: Int -> MsgM25FlashWriteStatus -> ShowS # show :: MsgM25FlashWriteStatus -> String # showList :: [MsgM25FlashWriteStatus] -> ShowS # | |
ToJSON MsgM25FlashWriteStatus Source # | |
Defined in SwiftNav.SBP.Flash toJSON :: MsgM25FlashWriteStatus -> Value # toEncoding :: MsgM25FlashWriteStatus -> Encoding # toJSONList :: [MsgM25FlashWriteStatus] -> Value # | |
FromJSON MsgM25FlashWriteStatus Source # | |
Defined in SwiftNav.SBP.Flash | |
Binary MsgM25FlashWriteStatus Source # | |
Defined in SwiftNav.SBP.Flash put :: MsgM25FlashWriteStatus -> Put # get :: Get MsgM25FlashWriteStatus # putList :: [MsgM25FlashWriteStatus] -> Put # | |
ToSBP MsgM25FlashWriteStatus Source # | |
Defined in SwiftNav.SBP.Flash |