52static volatile struct process *notification_process;
67 if(notification_process != NULL) {
69 notification_process = NULL;
82 lpm_register_peripheral(permit_pm1);
112 notification_process = p;
129 offset *=
sizeof(uint32_t);
131 for(
size_t i = 0; i < num_words; i++) {
132 REG(offset +
sizeof(uint32_t) * i) = words[i];
139 offset *=
sizeof(uint32_t);
147 offset *=
sizeof(uint32_t);
157 offset *=
sizeof(uint32_t);
160 uint32_t word = bytes[--num_bytes];
161 word |= bytes[--num_bytes] << 8;
162 word |= bytes[--num_bytes] << 16;
163 word |= bytes[--num_bytes] << 24;
165 offset +=
sizeof(uint32_t);
174 offset *=
sizeof(uint32_t);
176 size_t remaining_bytes = num_words *
sizeof(uint32_t);
177 while(remaining_bytes) {
178 uint32_t word = REG(offset);
179 bytes[--remaining_bytes] = word;
180 bytes[--remaining_bytes] = word >> 8;
181 bytes[--remaining_bytes] = word >> 16;
182 bytes[--remaining_bytes] = word >> 24;
183 offset +=
sizeof(uint32_t);
#define PKA_FUNCTION_RUN
The host sets this bit to instruct the PKA module to begin processing the basic PKCP or complex seque...
uint32_t pka_word_from_pka_ram(uintptr_t offset)
Retrieves a word from the PKA RAM.
void pka_run_function(uint32_t function)
Initiates the given PKA function.
void pka_word_to_pka_ram(uint32_t word, uintptr_t offset)
Copies a word to the PKA RAM.
#define PKA_FUNCTION
PKA function This register contains the control bits to start basic PKCP as well as complex sequencer...
void pka_register_process_notification(struct process *p)
Registers a process to be notified of the completion of a PKA operation.
#define PKA_RAM_BASE
PKA Memory Address.
void pka_big_endian_from_pka_ram(uint8_t *bytes, size_t num_words, uintptr_t offset)
Retrieves a big-endian sequence of bytes from the PKA RAM.
void pka_isr(void)
The PKA engine ISR.
void pka_disable(void)
Disables the PKA engine.
void pka_init(void)
Enables and resets the PKA engine.
void pka_enable(void)
Enables the PKA engine.
void pka_little_endian_to_pka_ram(const uint32_t *words, size_t num_words, uintptr_t offset)
Copies a little-endian sequence of words to the PKA RAM.
void pka_big_endian_to_pka_ram(const uint8_t *bytes, size_t num_bytes, uintptr_t offset)
Copies a big-endian sequence of bytes to the PKA RAM.
bool pka_check_status(void)
Checks the status of the PKA engine operation.
#define SYS_CTRL_RCGCSEC
Sec Mod clocks - active mode.
#define SYS_CTRL_SCGCSEC_PKA
PKA clock enable, CPU IDLE.
#define SYS_CTRL_SCGCSEC
Sec Mod clocks - sleep mode.
#define SYS_CTRL_RCGCSEC_PKA
PKA clock enable, CPU running.
#define SYS_CTRL_DCGCSEC
Sec Mod clocks - PM0.
#define SYS_CTRL_DCGCSEC_PKA
PKA clock enable, PM0.
void process_poll(struct process *p)
Request a process to be polled.
Header file for the ARM Nested Vectored Interrupt Controller.
Header file for the cc2538 PKA engine driver.
Header file with register manipulation macro definitions.
Header file for the cc2538 System Control driver.